Problem | lunchbox |
---|---|
User | redline |
Submission Time | 2025-06-15 23:29:48 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:9:2: error: expected initializer before ‘for’
9 | for (i = 0; i < m; ++i){
| ^~~
lunchbox.cpp:9:14: error: ‘i’ was not declared in this scope
9 | for (i = 0; i < m; ++i){
| ^
lunchbox.cpp:13:7: error: ‘arr’ was not declared in this scope
13 | sort(arr, arr + m);
| ^~~
lunchbox.cpp:13:2: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
13 | sort(arr, arr + m);
| ^~~~
| qsort
lunchbox.cpp:16:31: error: expected ‘;’ before ‘N’
16 | if (N - arr[i] < 0) continue
| ^
| ;
17 | N -= arr[i];
| ~