Problem lunchbox
User Xiwen
Submission Time 2025-11-03 21:55:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:5:9: error: ‘N’ was not declared in this scope
5 | cin >> N >> m;
| ^
lunchbox.cpp:5:14: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
5 | cin >> N >> m;
| ^
| tm
lunchbox.cpp:9:7: error: ‘i’ was not declared in this scope
9 | for (i = 0; i < m; ++i) {
| ^
lunchbox.cpp:10:10: error: ‘numArray’ was not declared in this scope
10 | cin >> numArray[i];
| ^~~~~~~~
lunchbox.cpp:13:17: error: ‘numArray’ was not declared in this scope
13 | for (int num : numArray) {
| ^~~~~~~~
lunchbox.cpp:17:2: error: expected ‘(’ at end of input
17 | while
| ^~~~~
| (
lunchbox.cpp:17:2: error: expected primary-expression at end of input
17 | while
| ^~~~~
lunchbox.cpp:17:7: error: expec