Problem ccs
User KYKY027
Submission Time 2026-03-04 13:36:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ccs.cpp: In function ‘int main()’:
ccs.cpp:18:29: error: no matching function for call to ‘sort(std::vector<int>::iterator)’
18 | sort(sleepingCats.begin());
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from ccs.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:
ccs.cpp:18:29: note: candidate expects 2 arguments, 1 provided
18 | sort(sleepingCats.begin());
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/std