Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <queue>
- using namespace std;
- long long A[100000];
- int main() {
- priority_queue<int> pq;
- pq.push(3);
- pq.push(1);
- pq.push(5);
- pq.push(2);
- pq.push(6);
- pq.push(0);
- while(!pq.empty()) {
- cout << pq.top() << endl;
- pq.pop();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment