Problem lunchbox
User hitarthdangra
Submission Time 2025-06-18 14:15:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:8:25: error: ‘M’ was not declared in this scope
8 | for (int i = 0; i < M; i++) {
| ^
lunchbox.cpp:9:16: error: ‘k’ was not declared in this scope
9 | cin >> k[i];
| ^
lunchbox.cpp:14:25: error: ‘M’ was not declared in this scope
14 | for (int i = 0; i < M; i++) {
| ^
lunchbox.cpp:17:21: error: expected ‘;’ before ‘}’ token
17 | res += 1
| ^
| ;
18 | }
| ~
lunchbox.cpp:20:24: error: expected ‘;’ before ‘}’ token
20 | cout << res << "\n"
| ^
| ;
......
24 | }
| ~