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

Compile Error

cc1plus: error: ‘::main’ must return ‘int’
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:7:15: error: expected ‘;’ before ‘priority_queue’
7 | cin >> n >> m
| ^
| ;
8 | priority_queue<int, vector<int>, greater<int>>pq;
| ~~~~~~~~~~~~~~
lunchbox.cpp:11:3: error: ‘pq’ was not declared in this scope
11 | pq.push(b);
| ^~
lunchbox.cpp:13:9: error: ‘pq’ was not declared in this scope
13 | while(!pq empty() && n >= pq.top()){
| ^~
lunchbox.cpp:13:11: error: expected ‘)’ before ‘empty’
13 | while(!pq empty() && n >= pq.top()){
| ~ ^~~~~~
| )
lunchbox.cpp:13:18: error: no matching function for call to ‘empty()’
13 | while(!pq empty() && n >= pq.top()){
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/inc