Problem lunchbox
User xiaocai918
Submission Time 2026-09-13 10:16:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:10:15: error: ‘i’ was not declared in this scope
10 | vector<int>k[i];
| ^
lunchbox.cpp:12:18: error: expected ‘;’ before ‘<’ token
12 | for(int i = 0, i < m, ++i) {
| ^~
| ;
lunchbox.cpp:12:19: error: expected primary-expression before ‘<’ token
12 | for(int i = 0, i < m, ++i) {
| ^
lunchbox.cpp:12:27: error: expected ‘;’ before ‘)’ token
12 | for(int i = 0, i < m, ++i) {
| ^
| ;
lunchbox.cpp:13:10: error: ‘k’ was not declared in this scope
13 | cin >> k[i];
| ^
lunchbox.cpp:16:7: error: ‘k’ was not declared in this scope
16 | sort(k.begin(), k.end())
| ^
lunchbox.cpp:19:18: error: expected ‘;’ before ‘<’ token
19 | for(int i = 0, i