Problem priorityqueue
User hitarthdangra
Submission Time 2025-06-19 09:22:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

priorityqueue.cpp: In function ‘int main()’:
priorityqueue.cpp:7:16: error: expected unqualified-id before ‘>’ token
7 | priority_queue>int> pq;
| ^
priorityqueue.cpp:12:4: error: ‘pq’ was not declared in this scope
12 | pq.pop();
| ^~
priorityqueue.cpp:16:4: error: ‘pq’ was not declared in this scope
16 | pq.push(x);
| ^~
priorityqueue.cpp:16:12: error: ‘x’ was not declared in this scope
16 | pq.push(x);
| ^
priorityqueue.cpp:18:15: error: ‘pq’ was not declared in this scope
18 | int size = pq.size();
| ^~
priorityqueue.cpp:19:9: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘int’)
19 | cout >> size >> "\n";
| ~~~~ ^~ ~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<