Problem lunchbox
User dieunq1309
Submission Time 2023-02-17 10:16:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:7:14: error: ‘M’ was not declared in this scope
7 | cin >> N >> M;
| ^
lunchbox.cpp:11:6: error: storage size of ‘arr’ isn’t known
11 | int arr[];
| ^~~
lunchbox.cpp:12:20: error: expected ‘;’ before ‘)’ token
12 | for(i=0, i<=m, i++)
| ^
| ;
lunchbox.cpp:18:16: error: ‘n’ was not declared in this scope
18 | sort(arr, arr+n);
| ^
lunchbox.cpp:18:18: error: expected ‘)’ before ‘;’ token
18 | sort(arr, arr+n);
| ^
| )
lunchbox.cpp:12:5: note: to match this ‘(’
12 | for(i=0, i<=m, i++)
| ^
lunchbox.cpp:19:24: error: expected ‘;’ before ‘)’ token
19 | for(i2 = 0, i2<=m, i++)
| ^
| ;
lunchbox.cpp:30:2: er