Problem arrayfind
User alice157050
Submission Time 2026-06-25 16:39:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:16:35: error: ‘arr’ was not declared in this scope
16 | int smaller = lower_bound(arr.begin(), arr.end(), x) - arr.begin();
| ^~~
arrayfind.cpp:17:23: error: ‘n’ was not declared in this scope
17 | int greater = n - (upper_bound(arr.begin(), arr.end(), x) - arr.begin());
| ^