Problem binarysearch
User xyzidk9
Submission Time 2026-04-29 15:57:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

binarysearch.cpp: In function ‘int main()’:
binarysearch.cpp:16:12: error: no matching function for call to ‘sort(std::deque<int>&)’
16 | sort(copy);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from binarysearch.cpp:3:
/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:
binarysearch.cpp:16:12: note: candidate expects 2 arguments, 1 provided
16 | sort(copy);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from binarysearch.cpp:3:
/usr/include/c++/9/bits/stl_algo.h:4893:5: note: candidate: ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _C