| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1330731 | sodbayr | Arranging Shoes (IOI19_shoes) | C++20 | Compilation error | 0 ms | 0 KiB |
#include "shoes.h"
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define endl "\n"
using namespace std;
ll tree[800005];bool bb[200005];
void update(ll node,ll l,ll r,ll L,ll val){
if(L>r || L<l) return;
if (l==r){tree[node]=val;return;}
ll mid=(l+r)/2;
update(node*2,l,mid,L,val);
update(node*2+1,mid+1,r,L,val);
tree[node]=tree[node*2+1]+tree[node*2];
}
ll query(ll node,ll l,ll r,ll L,ll R){
if(R<l || L>r) return 0;
if (l>=L && r<=R) {return tree[node];}
ll mid=(l+r)/2;
ll u=query(node*2,l,mid,L,R);
ll uu=query(node*2+1,mid+1,r,L,R);
return u+uu;
}
ll count_swaps(vector<int> s){ll n=s.size();
ll ans=0;
vector<pair<ll,ll> > v;
for(int i=0;i<n;i++){
update(1,1,n,i+1,1);
v.pb({s[i],i+1});
}
sort(v.begin(),v.end());
for(int i=0;i<n;i++){
if(bb[i]==1) continue;
ll k=-s[i];
pair<ll,ll> p={k,0};
ll o=lower_bound(v.begin(),v.end(),p)-v.begin();
if(v[o].ss<i+1){swap(i+1,v[o].ss);}
ll g=query(1,1,n,i+2,v[o].ss-1);
if(s[i]>0) g++;
ans+=g;
update(1,1,n,i+1,0);
update(1,1,n,v[o].ss,0);
bb[i]=1;
bb[o]=1;
v[o].ss=0;
}
return ans;
}Compilation message (stderr)
shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:39:37: error: no matching function for call to 'swap(int, long long int&)'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:77,
from shoes.cpp:2:
/usr/include/c++/13/any:429:15: note: candidate: 'void std::swap(any&, any&)' (near match)
429 | inline void swap(any& __x, any& __y) noexcept { __x.swap(__y); }
| ^~~~
/usr/include/c++/13/any:429:15: note: conversion of argument 2 would be ill-formed:
shoes.cpp:6:12: error: cannot bind non-const lvalue reference of type 'std::any&' to an rvalue of type 'std::any'
6 | #define ss second
shoes.cpp:39:47: note: in expansion of macro 'ss'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ^~
/usr/include/c++/13/any:190:7: note: after user-defined conversion: 'std::any::any(_Tp&&) [with _Tp = long long int&; _VTp = long long int; _Mgr = _Manager_internal<long long int>; typename std::enable_if<(is_copy_constructible_v<_VTp> && (! __is_in_place_type_v<_VTp>)), bool>::type <anonymous> = true]'
190 | any(_Tp&& __value)
| ^~~
In file included from /usr/include/c++/13/stop_token:37,
from /usr/include/c++/13/condition_variable:49,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:174:
/usr/include/c++/13/bits/std_thread.h:319:3: note: candidate: 'void std::swap(thread&, thread&)'
319 | swap(thread& __x, thread& __y) noexcept
| ^~~~
/usr/include/c++/13/bits/std_thread.h:319:16: note: no known conversion for argument 1 from 'int' to 'std::thread&'
319 | swap(thread& __x, thread& __y) noexcept
| ~~~~~~~~^~~
In file included from /usr/include/c++/13/exception:164,
from /usr/include/c++/13/stdexcept:38,
from /usr/include/c++/13/system_error:43,
from /usr/include/c++/13/bits/ios_base.h:46,
from /usr/include/c++/13/streambuf:43,
from /usr/include/c++/13/bits/streambuf_iterator.h:35,
from /usr/include/c++/13/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:54:
/usr/include/c++/13/bits/exception_ptr.h:230:5: note: candidate: 'void std::__exception_ptr::swap(exception_ptr&, exception_ptr&)'
230 | swap(exception_ptr& __lhs, exception_ptr& __rhs)
| ^~~~
/usr/include/c++/13/bits/exception_ptr.h:230:25: note: no known conversion for argument 1 from 'int' to 'std::__exception_ptr::exception_ptr&'
230 | swap(exception_ptr& __lhs, exception_ptr& __rhs)
| ~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/13/complex:45,
from /usr/include/c++/13/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:127:
/usr/include/c++/13/sstream:1204:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_stringbuf<_CharT, _Traits, _Alloc>&, basic_stringbuf<_CharT, _Traits, _Alloc>&)'
1204 | swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/13/sstream:1204:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/sstream:1212:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_istringstream<_CharT, _Traits, _Allocator>&, basic_istringstream<_CharT, _Traits, _Allocator>&)'
1212 | swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/13/sstream:1212:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/sstream:1219:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_ostringstream<_CharT, _Traits, _Allocator>&, basic_ostringstream<_CharT, _Traits, _Allocator>&)'
1219 | swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/13/sstream:1219:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/sstream:1226:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_stringstream<_CharT, _Traits, _Allocator>&, basic_stringstream<_CharT, _Traits, _Allocator>&)'
1226 | swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/13/sstream:1226:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/regex:68,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:181:
/usr/include/c++/13/bits/regex.h:896:5: note: candidate: 'template<class _Ch_type, class _Rx_traits> void std::__cxx11::swap(basic_regex<_Ch_type, _Rx_traits>&, basic_regex<_Ch_type, _Rx_traits>&)'
896 | swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
| ^~~~
/usr/include/c++/13/bits/regex.h:896:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__cxx11::basic_regex<_Ch_type, _Rx_traits>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/regex.h:2230:5: note: candidate: 'template<class _Bi_iter, class _Alloc> void std::__cxx11::swap(match_results<_BiIter, _Alloc>&, match_results<_BiIter, _Alloc>&)'
2230 | swap(match_results<_Bi_iter, _Alloc>& __lhs,
| ^~~~
/usr/include/c++/13/bits/regex.h:2230:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__cxx11::match_results<_BiIter, _Alloc>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/bits/stl_pair.h:61,
from /usr/include/c++/13/bits/stl_algobase.h:64,
from /usr/include/c++/13/vector:62,
from shoes.h:5,
from shoes.cpp:1:
/usr/include/c++/13/bits/move.h:189:5: note: candidate: 'template<class _Tp> constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&)'
189 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/13/bits/move.h:189:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: deduced conflicting types for parameter '_Tp' ('int' and 'long long int')
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/move.h:213:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::__enable_if_t<std::__is_swappable<_Tp>::value> std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])'
213 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~~
/usr/include/c++/13/bits/move.h:213:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types '_Tp [_Nm]' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:879:5: note: candidate: 'template<class _T1, class _T2> constexpr typename std::enable_if<std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value>::type std::swap(pair<_T1, _T2>&, pair<_T1, _T2>&)'
879 | swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
| ^~~~
/usr/include/c++/13/bits/stl_pair.h:879:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::pair<_T1, _T2>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:896:5: note: candidate: 'template<class _T1, class _T2> typename std::enable_if<(! std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value)>::type std::swap(pair<_T1, _T2>&, pair<_T1, _T2>&)' (deleted)
896 | swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete;
| ^~~~
/usr/include/c++/13/bits/stl_pair.h:896:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::pair<_T1, _T2>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66:
/usr/include/c++/13/bits/stl_vector.h:2112:5: note: candidate: 'template<class _Tp, class _Alloc> constexpr void std::swap(vector<_Tp, _Alloc>&, vector<_Tp, _Alloc>&)'
2112 | swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
| ^~~~
/usr/include/c++/13/bits/stl_vector.h:2112:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::vector<_Tp, _Alloc>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/bits/uses_allocator_args.h:38,
from /usr/include/c++/13/bits/memory_resource.h:41,
from /usr/include/c++/13/vector:80:
/usr/include/c++/13/tuple:2183:5: note: candidate: 'template<class ... _Elements> constexpr typename std::enable_if<std::__and_<std::__is_swappable<_Elements>...>::value>::type std::swap(tuple<_UTypes ...>&, tuple<_UTypes ...>&)'
2183 | swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
| ^~~~
/usr/include/c++/13/tuple:2183:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::tuple<_UTypes ...>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/tuple:2201:5: note: candidate: 'template<class ... _Elements> constexpr typename std::enable_if<(! std::__and_<std::__is_swappable<_Elements>...>::value)>::type std::swap(tuple<_UTypes ...>&, tuple<_UTypes ...>&)' (deleted)
2201 | swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
| ^~~~
/usr/include/c++/13/tuple:2201:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::tuple<_UTypes ...>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/string:54,
from /usr/include/c++/13/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52:
/usr/include/c++/13/bits/basic_string.h:3994:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr void std::swap(__cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3994 | swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~
/usr/include/c++/13/bits/basic_string.h:3994:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/functional:59,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53:
/usr/include/c++/13/bits/std_function.h:776:5: note: candidate: 'template<class _Res, class ... _Args> void std::swap(function<_Res(_ArgTypes ...)>&, function<_Res(_ArgTypes ...)>&)'
776 | swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept
| ^~~~
/usr/include/c++/13/bits/std_function.h:776:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::function<_Res(_ArgTypes ...)>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/unordered_map:41,
from /usr/include/c++/13/functional:63:
/usr/include/c++/13/bits/unordered_map.h:2129:5: note: candidate: 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> void std::swap(unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&)'
2129 | swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
| ^~~~
/usr/include/c++/13/bits/unordered_map.h:2129:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/unordered_map.h:2136:5: note: candidate: 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> void std::swap(unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&)'
2136 | swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
| ^~~~
/usr/include/c++/13/bits/unordered_map.h:2136:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/functional:65:
/usr/include/c++/13/array:371:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::__enable_if_t<typename std::__array_traits<_Tp, _Nm>::_Is_swappable::value> std::swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&)'
371 | swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
| ^~~~
/usr/include/c++/13/array:371:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::array<_Tp, _Nm>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/array:378:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> std::__enable_if_t<(! typename std::__array_traits<_Tp, _Nm>::_Is_swappable::value)> std::swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&)' (deleted)
378 | swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete;
| ^~~~
/usr/include/c++/13/array:378:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::array<_Tp, _Nm>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/memory:78,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:56:
/usr/include/c++/13/bits/unique_ptr.h:813:5: note: candidate: 'template<class _Tp, class _Dp> typename std::enable_if<std::__is_swappable<_T2>::value>::type std::swap(unique_ptr<_Tp, _Dp>&, unique_ptr<_Tp, _Dp>&)'
813 | swap(unique_ptr<_Tp, _Dp>& __x,
| ^~~~
/usr/include/c++/13/bits/unique_ptr.h:813:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::unique_ptr<_Tp, _Dp>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:820:5: note: candidate: 'template<class _Tp, class _Dp> typename std::enable_if<(! std::__is_swappable<_T2>::value)>::type std::swap(unique_ptr<_Tp, _Dp>&, unique_ptr<_Tp, _Dp>&)' (deleted)
820 | swap(unique_ptr<_Tp, _Dp>&,
| ^~~~
/usr/include/c++/13/bits/unique_ptr.h:820:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::unique_ptr<_Tp, _Dp>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/bits/shared_ptr.h:53,
from /usr/include/c++/13/memory:80:
/usr/include/c++/13/bits/shared_ptr_base.h:1917:5: note: candidate: 'template<class _Tp, __gnu_cxx::_Lock_policy _Lp> void std::swap(__shared_ptr<_Tp, _Lp>&, __shared_ptr<_Tp, _Lp>&)'
1917 | swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept
| ^~~~
/usr/include/c++/13/bits/shared_ptr_base.h:1917:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__shared_ptr<_Tp, _Lp>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/shared_ptr_base.h:2126:5: note: candidate: 'template<class _Tp, __gnu_cxx::_Lock_policy _Lp> void std::swap(__weak_ptr<_Tp, _Lp>&, __weak_ptr<_Tp, _Lp>&)'
2126 | swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept
| ^~~~
/usr/include/c++/13/bits/shared_ptr_base.h:2126:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__weak_ptr<_Tp, _Lp>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/shared_ptr.h:692:5: note: candidate: 'template<class _Tp> void std::swap(shared_ptr<_Tp>&, shared_ptr<_Tp>&)'
692 | swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept
| ^~~~
/usr/include/c++/13/bits/shared_ptr.h:692:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::shared_ptr<_Tp>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/shared_ptr.h:888:5: note: candidate: 'template<class _Tp> void std::swap(weak_ptr<_Tp>&, weak_ptr<_Tp>&)'
888 | swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept
| ^~~~
/usr/include/c++/13/bits/shared_ptr.h:888:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::weak_ptr<_Tp>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:79:
/usr/include/c++/13/optional:1450:5: note: candidate: 'template<class _Tp> constexpr std::enable_if_t<(is_move_constructible_v<_Tp> && is_swappable_v<_Tp>)> std::swap(optional<_Tp>&, optional<_Tp>&)'
1450 | swap(optional<_Tp>& __lhs, optional<_Tp>& __rhs)
| ^~~~
/usr/include/c++/13/optional:1450:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::optional<_Tp>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/optional:1456:5: note: candidate: 'template<class _Tp> std::enable_if_t<(!(is_move_constructible_v<_Tp> && is_swappable_v<_Tp>))> std::swap(optional<_Tp>&, optional<_Tp>&)' (deleted)
1456 | swap(optional<_Tp>&, optional<_Tp>&) = delete;
| ^~~~
/usr/include/c++/13/optional:1456:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::optional<_Tp>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:80:
/usr/include/c++/13/variant:1320:5: note: candidate: 'template<class ... _Types> constexpr std::enable_if_t<((is_move_constructible_v<_Types> && ...) && (is_swappable_v<_Types> && ...))> std::swap(variant<_Types ...>&, variant<_Types ...>&)'
1320 | swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs)
| ^~~~
/usr/include/c++/13/variant:1320:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::variant<_Types ...>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/variant:1327:5: note: candidate: 'template<class ... _Types> std::enable_if_t<(!((is_move_constructible_v<_Types> && ...) && (is_swappable_v<_Types> && ...)))> std::swap(variant<_Types ...>&, variant<_Types ...>&)' (deleted)
1327 | swap(variant<_Types...>&, variant<_Types...>&) = delete;
| ^~~~
/usr/include/c++/13/variant:1327:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::variant<_Types ...>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/deque:66,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:139:
/usr/include/c++/13/bits/stl_deque.h:2366:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(deque<_Tp, _Alloc>&, deque<_Tp, _Alloc>&)'
2366 | swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
| ^~~~
/usr/include/c++/13/bits/stl_deque.h:2366:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::deque<_Tp, _Alloc>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:141:
/usr/include/c++/13/fstream:1271:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(basic_filebuf<_CharT, _Traits>&, basic_filebuf<_CharT, _Traits>&)'
1271 | swap(basic_filebuf<_CharT, _Traits>& __x,
| ^~~~
/usr/include/c++/13/fstream:1271:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::basic_filebuf<_CharT, _Traits>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/fstream:1278:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(basic_ifstream<_CharT, _Traits>&, basic_ifstream<_CharT, _Traits>&)'
1278 | swap(basic_ifstream<_CharT, _Traits>& __x,
| ^~~~
/usr/include/c++/13/fstream:1278:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::basic_ifstream<_CharT, _Traits>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/fstream:1285:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(basic_ofstream<_CharT, _Traits>&, basic_ofstream<_CharT, _Traits>&)'
1285 | swap(basic_ofstream<_CharT, _Traits>& __x,
| ^~~~
/usr/include/c++/13/fstream:1285:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::basic_ofstream<_CharT, _Traits>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/fstream:1292:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(basic_fstream<_CharT, _Traits>&, basic_fstream<_CharT, _Traits>&)'
1292 | swap(basic_fstream<_CharT, _Traits>& __x,
| ^~~~
/usr/include/c++/13/fstream:1292:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::basic_fstream<_CharT, _Traits>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/list:65,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:150:
/usr/include/c++/13/bits/stl_list.h:2216:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(__cxx11::list<_Tp, _Alloc>&, __cxx11::list<_Tp, _Alloc>&)'
2216 | swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
| ^~~~
/usr/include/c++/13/bits/stl_list.h:2216:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::__cxx11::list<_Tp, _Alloc>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/map:62,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:152:
/usr/include/c++/13/bits/stl_tree.h:1679:5: note: candidate: 'template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> void std::swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)'
1679 | swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
| ^~~~
/usr/include/c++/13/bits/stl_tree.h:1679:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/map:63:
/usr/include/c++/13/bits/stl_map.h:1587:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> void std::swap(map<_Key, _Tp, _Compare, _Allocator>&, map<_Key, _Tp, _Compare, _Allocator>&)'
1587 | swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
| ^~~~
/usr/include/c++/13/bits/stl_map.h:1587:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::map<_Key, _Tp, _Compare, _Allocator>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/map:64:
/usr/include/c++/13/bits/stl_multimap.h:1208:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> void std::swap(multimap<_Key, _Tp, _Compare, _Allocator>&, multimap<_Key, _Tp, _Compare, _Allocator>&)'
1208 | swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
| ^~~~
/usr/include/c++/13/bits/stl_multimap.h:1208:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::multimap<_Key, _Tp, _Compare, _Allocator>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/queue:66,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157:
/usr/include/c++/13/bits/stl_queue.h:447:5: note: candidate: 'template<class _Tp, class _Seq> typename std::enable_if<std::__is_swappable<_T2>::value>::type std::swap(queue<_Tp, _Seq>&, queue<_Tp, _Seq>&)'
447 | swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:447:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::queue<_Tp, _Seq>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_queue.h:836:5: note: candidate: 'template<class _Tp, class _Sequence, class _Compare> typename std::enable_if<std::__and_<std::__is_swappable<_T2>, std::__is_swappable<_Compare> >::value>::type std::swap(priority_queue<_Tp, _Sequence, _Compare>&, priority_queue<_Tp, _Sequence, _Compare>&)'
836 | swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:836:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::priority_queue<_Tp, _Sequence, _Compare>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/set:63,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:158:
/usr/include/c++/13/bits/stl_set.h:1061:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> void std::swap(set<_Key, _Compare, _Allocator>&, set<_Key, _Compare, _Allocator>&)'
1061 | swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y)
| ^~~~
/usr/include/c++/13/bits/stl_set.h:1061:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::set<_Key, _Compare, _Allocator>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/set:64:
/usr/include/c++/13/bits/stl_multiset.h:1047:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> void std::swap(multiset<_Key, _Compare, _Allocator>&, multiset<_Key, _Compare, _Allocator>&)'
1047 | swap(multiset<_Key, _Compare, _Alloc>& __x,
| ^~~~
/usr/include/c++/13/bits/stl_multiset.h:1047:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::multiset<_Key, _Compare, _Allocator>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/stack:63,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:160:
/usr/include/c++/13/bits/stl_stack.h:423:5: note: candidate: 'template<class _Tp, class _Seq> typename std::enable_if<std::__is_swappable<_T2>::value>::type std::swap(stack<_Tp, _Seq>&, stack<_Tp, _Seq>&)'
423 | swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
| ^~~~
/usr/include/c++/13/bits/stl_stack.h:423:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::stack<_Tp, _Seq>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/condition_variable:43:
/usr/include/c++/13/bits/unique_lock.h:243:5: note: candidate: 'template<class _Mutex> void std::swap(unique_lock<_Mutex>&, unique_lock<_Mutex>&)'
243 | swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept
| ^~~~
/usr/include/c++/13/bits/unique_lock.h:243:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::unique_lock<_Mutex>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/forward_list:40,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:175:
/usr/include/c++/13/bits/forward_list.h:1537:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(forward_list<_Tp, _Alloc>&, forward_list<_Tp, _Alloc>&)'
1537 | swap(forward_list<_Tp, _Alloc>& __lx,
| ^~~~
/usr/include/c++/13/bits/forward_list.h:1537:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::forward_list<_Tp, _Alloc>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:176:
/usr/include/c++/13/future:1197:5: note: candidate: 'template<class _Res> void std::swap(promise<_Res>&, promise<_Res>&)'
1197 | swap(promise<_Res>& __x, promise<_Res>& __y) noexcept
| ^~~~
/usr/include/c++/13/future:1197:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::promise<_Res>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/future:1662:5: note: candidate: 'template<class _Res, class ... _ArgTypes> void std::swap(packaged_task<_Res(_ArgTypes ...)>&, packaged_task<_Res(_ArgTypes ...)>&)'
1662 | swap(packaged_task<_Res(_ArgTypes...)>& __x,
| ^~~~
/usr/include/c++/13/future:1662:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::packaged_task<_Res(_ArgTypes ...)>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/13/unordered_set:41,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:189:
/usr/include/c++/13/bits/unordered_set.h:1799:5: note: candidate: 'template<class _Value, class _Hash, class _Pred, class _Alloc> void std::swap(unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&, unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&)'
1799 | swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
| ^~~~
/usr/include/c++/13/bits/unordered_set.h:1799:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
/usr/include/c++/13/bits/unordered_set.h:1806:5: note: candidate: 'template<class _Value, class _Hash, class _Pred, class _Alloc> void std::swap(unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&, unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&)'
1806 | swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
| ^~~~
/usr/include/c++/13/bits/unordered_set.h:1806:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:193:
/usr/include/c++/13/shared_mutex:870:5: note: candidate: 'template<class _Mutex> void std::swap(shared_lock<_Mutex>&, shared_lock<_Mutex>&)'
870 | swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept
| ^~~~
/usr/include/c++/13/shared_mutex:870:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::shared_lock<_Mutex>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:219:
/usr/include/c++/13/syncstream:306:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::swap(basic_syncbuf<_CharT, _Traits, _Alloc>&, basic_syncbuf<_CharT, _Traits, _Alloc>&)'
306 | swap(basic_syncbuf<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/13/syncstream:306:5: note: template argument deduction/substitution failed:
shoes.cpp:39:37: note: mismatched types 'std::basic_syncbuf<_CharT, _Traits, _Alloc>' and 'int'
39 | if(v[o].ss<i+1){swap(i+1,v[o].ss);}
| ~~~~^~~~~~~~~~~~~