Problem lunchbox
User jwsk0
Submission Time 2025-10-25 12:48:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:8:2: error: expected initializer before ‘for’
8 | for(int i=0;i<m;i++){
| ^~~
lunchbox.cpp:8:14: error: ‘i’ was not declared in this scope
8 | for(int i=0;i<m;i++){
| ^
lunchbox.cpp:13:8: error: ‘k’ was not declared in this scope
13 | if (k[i]>k[i+1]){
| ^
lunchbox.cpp:24:11: error: ‘k’ was not declared in this scope
24 | sum += k[i];
| ^