swaps.cpp: In function 'void solve(int, int)':
swaps.cpp:25:26: error: no matching function for call to 'std::vector<int>::push_back(<brace-enclosed initializer list>)'
25 | vec.push_back({idx[i], idx[i+1]});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
from swaps.h:5,
from swaps.cpp:10:
/usr/include/c++/13/bits/stl_vector.h:1281:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1281 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1281:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<int>::value_type&' {aka 'const int&'}
1281 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1298:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1298 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1298:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<int>::value_type&&' {aka 'int&&'}
1298 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
swaps.cpp:29:40: error: request for member 'first' in 'vec.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
29 | if(tmp[i]) swap(idx[vec[i].first], idx[vec[i].second]);
| ^~~~~
swaps.cpp:29:59: error: request for member 'second' in 'vec.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
29 | if(tmp[i]) swap(idx[vec[i].first], idx[vec[i].second]);
| ^~~~~~