| Problem | lunchbox |
|---|---|
| User | Kaijun |
| Submission Time | 2026-04-10 17:36:17 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:15:8: error: request for member ‘push_back’ in ‘list’, which is of non-class type ‘std::__cxx11::list<int> [0]’
15 | list.push_back(k);
| ^~~~~~~~~
lunchbox.cpp:17:6: error: conflicting declaration ‘int n’
17 | int n = sizeof(list) / sizeof(list[0]);
| ^
lunchbox.cpp:8:12: note: previous declaration as ‘long long int n’
8 | long long n;
| ^
lunchbox.cpp:21:4: error: no match for ‘operator-=’ (operand types are ‘long long int’ and ‘std::__cxx11::list<int>’)
21 | n-=list[sc];
| ~^~~~~~~~~~
lunchbox.cpp:26:10: error: expected ‘;’ before ‘}’ token
26 | cout<<sc
| ^
| ;
27 |
28 | }
| ~
lunchbox.cpp:28:1: error: expected ‘}’ at end of input
28 | }
| ^
lunchbox.cpp:7:12: note: to match this ‘{’
7 | int main() {