Problem lunchbox
User Hi1057
Submission Time 2025-06-26 23:22:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:10:25: error: expected ‘;’ before ‘)’ token
10 | for (i = 1, i <= m, ++i) {
| ^
| ;
lunchbox.cpp:15:13: error: could not convert ‘school.std::__cxx11::list<int>::sort()’ from ‘void’ to ‘bool’
15 | school.sort();
| ~~~~~~~~~~~^~
| |
| void
lunchbox.cpp:16:2: error: expected primary-expression before ‘while’
16 | while (result > N) {
| ^~~~~
lunchbox.cpp:15:16: error: expected ‘)’ before ‘while’
15 | school.sort();
| ^
| )
16 | while (result > N) {
| ~~~~~
lunchbox.cpp:10:6: note: to match this ‘(’
10 | for (i = 1, i <= m, ++i) {
| ^