Problem lunchbox
User Kaijun
Submission Time 2026-04-10 16:39:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:10:7: error: ‘i’ was not declared in this scope
10 | for (i=0;i<m;i++){
| ^
lunchbox.cpp:13:8: error: request for member ‘pushback’ in ‘list’, which is of non-class type ‘long long int [0]’
13 | list.pushback(k);
| ^~~~~~~~
lunchbox.cpp:15:6: error: conflicting declaration ‘int n’
15 | int n = sizeof(list) / sizeof(list[0]);
| ^
lunchbox.cpp:6:12: note: previous declaration as ‘long long int n’
6 | long long n;
| ^
lunchbox.cpp:23:7: error: expected ‘;’ before ‘cout’
23 | sc++
| ^
| ;
24 | cout<<sc
| ~~~~
lunchbox.cpp:26:2: error: expected ‘}’ at end of input
26 | }
| ^
lunchbox.cpp:5:12: note: to match this ‘{’
5 | int main() {
| ^