Problem lunchbox
User leafeon
Submission Time 2025-05-25 14:09:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:18:5: error: request for member ‘push_back’ in ‘e’, which is of non-class type ‘std::vector<long long int> [sch]’
18 | e.push_back(n)
| ^~~~~~~~~
lunchbox.cpp:20:14: error: request for member ‘begin’ in ‘e’, which is of non-class type ‘std::vector<long long int> [sch]’
20 | std::sort(e.begin(), e.end());
| ^~~~~
lunchbox.cpp:20:25: error: request for member ‘end’ in ‘e’, which is of non-class type ‘std::vector<long long int> [sch]’
20 | std::sort(e.begin(), e.end());
| ^~~
lunchbox.cpp:22:5: error: no match for ‘operator+=’ (operand types are ‘long long int’ and ‘std::vector<long long int>’)
22 | y += e[0];
| ~~^~~~~~~
lunchbox.cpp:23:5: error: request for member ‘pop_back’ in ‘e’, which is of non-class type ‘std::vector<long long int> [sch]’
23 | e.pop_back()
|