Problem lunchbox
User sergius
Submission Time 2024-06-19 15:18:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:7:47: error: template argument 3 is invalid
7 | priority_queue<int, vector<int>, greater<int>pq;
| ^~
lunchbox.cpp:10:3: error: ‘pq’ was not declared in this scope
10 | pq.push(b);
| ^~
lunchbox.cpp:12:9: error: ‘pq’ was not declared in this scope
12 | while(!pq empty() && n >= pq.top()){
| ^~
lunchbox.cpp:12:11: error: expected ‘)’ before ‘empty’
12 | while(!pq empty() && n >= pq.top()){
| ~ ^~~~~~
| )
lunchbox.cpp:12:18: error: no matching function for call to ‘empty()’
12 | while(!pq empty() && n >= pq.top()){
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,