Problem lunchbox
User Water
Submission Time 2023-09-15 22:48:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:9:9: error: expected primary-expression before ‘int’
9 | cin >> int N >> int m >> endl;
| ^~~
lunchbox.cpp:10:8: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
10 | int A[m];
| ^
| tm
lunchbox.cpp:12:16: error: expected primary-expression before ‘int’
12 | cin >> int k >> endl;
| ^~~
lunchbox.cpp:14:10: error: ‘k’ was not declared in this scope
14 | sum += k;
| ^
lunchbox.cpp:15:3: error: ‘A’ was not declared in this scope
15 | A[i] = k;
| ^
lunchbox.cpp:19:3: error: ‘A’ was not declared in this scope
19 | A[i] = min;
| ^
lunchbox.cpp:27:13: error: ‘N’ was not declared in this scope
27 | if (sum < N){
| ^
lunchbox.cpp:33:1: error: expected ‘}’ at end of input
33 | }