Problem lunchbox
User yq
Submission Time 2026-06-24 21:01:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:9:14: error: expected ‘;’ before ‘}’ token
9 | cin >> k[i]
| ^
| ;
10 | }
| ~
lunchbox.cpp:11:17: error: ‘std::vector<long long int>::iterator’ {aka ‘class __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’} has no member named ‘k’
11 | sort(k.begin().k.end());
| ^
lunchbox.cpp:2:13: error: expected ‘,’ or ‘;’ before ‘long’
2 | #define int long long
| ^~~~
lunchbox.cpp:13:3: note: in expansion of macro ‘int’
13 | int count = 0;
| ^~~
lunchbox.cpp:15:25: error: expected initializer before ‘-’ token
15 | if(int curlunchboxes - k[i] >= 0 ) {
| ^
lunchbox.cpp:15:24: error: expected ‘)’ before ‘-’ token
15 | if(int curlunchboxes - k[i] >= 0 ) {
|