Problem gymbadges
User loverin
Submission Time 2023-09-12 11:00:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gymbadges.cpp: In function ‘int simulate(const std::vector<gymStats>&)’:
gymbadges.cpp:26:34: error: no matching function for call to ‘swap(const value_type&, const value_type&)’
26 | std::swap(gym[i], gym[i + 1]);
| ^
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
from /usr/include/c++/9/exception:144,
from /usr/include/c++/9/ios:39,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from gymbadges.cpp:1:
/usr/include/c++/9/bits/move.h:182:5: note: candidate: ‘template<class _Tp> typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&)’
182 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/9/