Problem duckhunt5
User jambusk
Submission Time 2025-06-18 16:10:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt5.cpp: In function ‘int main()’:
duckhunt5.cpp:15:27: error: no matching function for call to ‘lower_bound(int&)’
15 | auto it = lower_bound(x);
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from duckhunt5.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:1004:5: note: candidate: ‘template<class _ForwardIterator, class _Tp> _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)’
1004 | lower_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algobase.h:1004:5: note: template argument deduction/substitution failed:
duckhunt5.cpp:15:27: note: candidate expects 3 arguments, 1 provided
15 | auto it = lower_bound(x);
|