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

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:11:6: error: request for member ‘push_back’ in ‘pq’, which is of non-class type ‘std::deque<int, std::allocator<int> > [m]’
11 | pq.push_back(a);
| ^~~~~~~~~
lunchbox.cpp:13:5: error: request for member ‘sort’ in ‘pq’, which is of non-class type ‘std::deque<int, std::allocator<int> > [m]’
13 | pq.sort();
| ^~~~
lunchbox.cpp:15:15: error: no matching function for call to ‘std::stack<int>::push(std::deque<int, std::allocator<int> >&)’
15 | s.push(pq[i]);
| ^
In file included from /usr/include/c++/9/stack:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:89,
from lunchbox.cpp:1:
/usr/include/c++/9/bits/stl_stack.h:233:7: note: candidate: ‘void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocato