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

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:6:15: error: expected ‘;’ before ‘priority_queue’
6 | cin >> n >> m
| ^
| ;
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,