Problem | medianheap |
---|---|
User | jaylchicken |
Submission Time | 2024-11-04 09:01:21 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
medianheap.cpp: In function ‘int main()’:
medianheap.cpp:5:5: error: ‘priority_queue’ was not declared in this scope
5 | priority_queue<int> pq;
| ^~~~~~~~~~~~~~
medianheap.cpp:2:1: note: ‘std::priority_queue’ is defined in header ‘<queue>’; did you forget to ‘#include <queue>’?
1 | #include <iostream>
+++ |+#include <queue>
2 | using namespace std;
medianheap.cpp:5:20: error: expected primary-expression before ‘int’
5 | priority_queue<int> pq;
| ^~~
medianheap.cpp:6:20: error: expected primary-expression before ‘int’
6 | priority_queue<int> final;
| ^~~
medianheap.cpp:14:13: error: ‘pq’ was not declared in this scope
14 | pq.push(num);
| ^~
medianheap.cpp:17:26: error: ‘pq’ was not declared in this scope
17 | int length = pq.size();
|