Problem arrayfind
User bestatchinesechess
Submission Time 2025-02-13 22:48:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘void arrayfind()’:
arrayfind.cpp:3:2: error: ‘cin’ was not declared in this scope
3 | cin >> l;
| ^~~
arrayfind.cpp:6:22: error: ‘L’ was not declared in this scope
6 | for (int i = 0; i < L; i++) {
| ^
arrayfind.cpp:15:11: error: request for member ‘begin’ in ‘arr’, which is of non-class type ‘int [l]’
15 | sort(arr.begin(), arr.end());
| ^~~~~
arrayfind.cpp:15:24: error: request for member ‘end’ in ‘arr’, which is of non-class type ‘int [l]’
15 | sort(arr.begin(), arr.end());
| ^~~
arrayfind.cpp:15:2: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
15 | sort(arr.begin(), arr.end());
| ^~~~
| short
arrayfind.cpp:19:29: error: request for member ‘begin’ in ‘arr’, which is of non-class type ‘int [l]’
19 | smaller = lower_bound(arr.begin(), arr.end(), x) - arr.b