shoes.cpp: In function 'int64_t count_swaps(std::vector<int>)':
shoes.cpp:64:21: error: no matching function for call to 'min(int64_t&, int&)'
64 | res=min(res,hm);
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from shoes.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
shoes.cpp:64:21: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
64 | res=min(res,hm);
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from shoes.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
shoes.cpp:64:21: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
64 | res=min(res,hm);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from shoes.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3468 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
shoes.cpp:64:21: note: mismatched types 'std::initializer_list<_Tp>' and 'long int'
64 | res=min(res,hm);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from shoes.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: template argument deduction/substitution failed:
shoes.cpp:64:21: note: mismatched types 'std::initializer_list<_Tp>' and 'long int'
64 | res=min(res,hm);
| ^
shoes.cpp:4:27: error: could not convert '(((void)xd.std::vector<long int>::begin()), xd.std::vector<long int>::end())' from 'std::vector<long int>::iterator' to 'bool'
4 | #define all(x) (x).begin(),(x).end()
| ~~~~~~~~~~~^~~~~~~~~~
| |
| std::vector<long int>::iterator
shoes.cpp:65:12: note: in expansion of macro 'all'
65 | }while(all(xd));
| ^~~
shoes.cpp:24:15: warning: unused variable 'ans' [-Wunused-variable]
24 | int64_t n , ans = 0;
| ^~~
shoes.cpp:89:1: warning: control reaches end of non-void function [-Wreturn-type]
89 | }
| ^