Problem lunchbox
User 4Russ
Submission Time 2026-06-23 16:22:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:10:25: error: ‘n’ was not declared in this scope
10 | for(int i = 1; i <= n; i++) cin >> a[i];
| ^
lunchbox.cpp:14:25: error: ‘n’ was not declared in this scope
14 | for(int i = 1; i <= n; i++) {
| ^
lunchbox.cpp:23:13: error: ‘n’ was not declared in this scope
23 | cout << n;
| ^