| Problem | priorityqueue |
|---|---|
| User | WANCH5789W |
| Submission Time | 2026-05-03 13:36:52 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
priorityqueue.cpp: In function ‘int main()’:
priorityqueue.cpp:27:36: error: ‘p’ was not declared in this scope
27 | if (q.front() != V || q.empty()) {p = false;
| ^
priorityqueue.cpp:31:41: error: no match for ‘operator=’ (operand types are ‘std::priority_queue<long long int>’ and ‘bool’)
31 | if (pq.top() != V || pq.empty()) {pq = false;}
| ^~~~~
In file included from /usr/include/c++/9/queue:64,
from priorityqueue.cpp:4:
/usr/include/c++/9/bits/stl_queue.h:443:11: note: candidate: ‘std::priority_queue<long long int>& std::priority_queue<long long int>::operator=(const std::priority_queue<long long int>&)’
443 | class priority_queue
| ^~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_queue.h:443:11: note: no known conversion for argument 1 from ‘bool’ to ‘const std::priority_queue<long long int&