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

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:12:8: error: no match for ‘operator!’ (operand type is ‘std::priority_queue<int, std::vector<int>, std::greater<int> >’)
12 | while(!pq empty() && n >= pq.top()){
| ^~~
lunchbox.cpp:12:8: note: candidate: ‘operator!(bool)’ <built-in>
lunchbox.cpp:12:8: note: no known conversion for argument 1 from ‘std::priority_queue<int, std::vector<int>, std::greater<int> >’ to ‘bool’
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_