Problem arrayfind
User scse513
Submission Time 2026-11-04 14:41:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:12:12: error: ‘Q’ was not declared in this scope
12 | cin >> Q;
| ^
arrayfind.cpp:15:16: error: ‘queries’ was not declared in this scope
15 | cin >> queries[i];
| ^~~~~~~
arrayfind.cpp:19:39: error: ‘queries’ was not declared in this scope
19 | int x = lower_bound(A, A + L, queries[i]);
| ^~~~~~~
arrayfind.cpp:22:10: error: no matching function for call to ‘sort()’
22 | sort()
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from arrayfind.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