Problem party_noi
User BZ123
Submission Time 2025-12-24 16:05:16
Score 0
Max Time N/A
Max Memory N/A

Compile Error

party_noi.cpp: In function ‘int main()’:
party_noi.cpp:18:36: error: no matching function for call to ‘sort(std::vector<int>::iterator, std::vector<int>::iterator, <unresolved overloaded function type>)’
18 | sort(hps.begin(),hps.end(),reverse)
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from party_noi.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: candidate: ‘template<class _RAIter> void std::sort(_RAIter, _RAIter)’
4863 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: template argument deduction/substitution failed:
party_noi.cpp:18:36: note: candidate expects 2 arguments, 3 provided
18 | sort(hps.begin(),hps.end(),reverse)
|