| Problem | arrayfind |
|---|---|
| User | Martin |
| Submission Time | 2026-08-30 12:31:24 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:8:11: error: ‘L’ was not declared in this scope
8 | int nums[L];
| ^
arrayfind.cpp:11:10: error: ‘nums’ was not declared in this scope
11 | cin >> nums[i];
| ^~~~
arrayfind.cpp:14:9: error: ‘Q’ was not declared in this scope
14 | cin >> Q;
| ^
arrayfind.cpp:22:24: error: ‘nums’ was not declared in this scope
22 | int* p = lower_bound(nums, nums+N, comp);
| ^~~~
arrayfind.cpp:23:12: error: redeclaration of ‘auto i’
23 | greater[i] = N-p;
| ^
arrayfind.cpp:18:11: note: ‘int i’ previously declared here
18 | for (int i = 0; i < Q; i ++) {
| ^
arrayfind.cpp:23:17: error: invalid operands of types ‘int’ and ‘int*’ to binary ‘operator-’
23 | greater[i] = N-p;
| ~^~
| | |