Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <queue>
- using namespace std;
- int main()
- {
- ios_base::sync_with_stdio(false);
- priority_queue<int> pq;
- pq.push(2);
- pq.push(1);
- pq.push(5);
- pq.push(3);
- pq.push(10);
- pq.push(4);
- while(!pq.empty()) {
- cout << pq.top() << endl;
- pq.pop();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement