Problem lunchbox
User peepeepoop
Submission Time 2026-01-05 18:31:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp:5:9: error: ‘i’ was not declared in this scope
5 | int arr[i]
| ^
lunchbox.cpp:6:1: error: expected initializer before ‘long’
6 | long long int m, N, p;
| ^~~~
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:9:9: error: ‘N’ was not declared in this scope
9 | cin >> N >> m;
| ^
lunchbox.cpp:9:14: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
9 | cin >> N >> m;
| ^
| tm
lunchbox.cpp:11:10: error: ‘arr’ was not declared in this scope
11 | cin >> arr[i];
| ^~~
lunchbox.cpp:16:7: error: ‘arr’ was not declared in this scope
16 | sort(arr, arr + m);
| ^~~
lunchbox.cpp:17:9: error: ‘p’ was not declared in this scope
17 | while (p < N) {
| ^
lunchbox.cpp:22:10: error: ‘p’ was not declared in this scope
22 | cout