Problem lunchbox
User jasmine
Submission Time 2023-11-09 10:17:52
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:13:18: error: no matching function for call to ‘std::priority_queue<int>::pop(const value_type&)’
13 | pq.pop(pq.top());
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from lunchbox.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:662:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = int; _Sequence = std::vector<int>; _Compare = std::less<int>]’
662 | pop()
| ^~~
/usr/include/c++/9/bits/stl_queue.h:662:7: note: candidate expects 0 arguments, 1 provided