Problem lunchbox
User ethantanaki
Submission Time 2026-03-07 10:38:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:11:6: error: ‘class std::vector<int>’ has no member named ‘push’
11 | pq.push(a);
| ^~~~
lunchbox.cpp:13:5: error: ‘class std::vector<int>’ has no member named ‘sort’
13 | pq.sort();
| ^~~~
lunchbox.cpp:17:16: error: ‘class std::vector<int>’ has no member named ‘top’
17 | while(N >= pq.top()) {
| ^~~
lunchbox.cpp:18:11: error: ‘class std::vector<int>’ has no member named ‘top’
18 | N -= pq.top();
| ^~~
lunchbox.cpp:20:6: error: ‘class std::vector<int>’ has no member named ‘pop’
20 | pq.pop();
| ^~~