Problem lunchbox
User caslyn
Submission Time 2026-06-23 15:47:44
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:13:33: error: expected ‘;’ before ‘sort’
13 | for(int i=0;i<m; i++) cin>>k[i]
| ^
| ;
14 |
15 | sort(k.begin(),k.end());
| ~~~~
lunchbox.cpp:18:2: error: expected ‘,’ or ‘;’ before ‘long’
18 | long long int sum=0
| ^~~~
lunchbox.cpp:19:14: error: ‘i’ was not declared in this scope
19 | for(int i=0;i<m;i++){
| ^
lunchbox.cpp:28:10: error: expected ‘;’ before ‘}’ token
28 | return 0
| ^
| ;
29 | }
| ~