Advertisement
Josif_tepe

Untitled

Apr 21st, 2021
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include<queue>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     priority_queue<int> pq;
  9.     pq.push(10);
  10.     pq.push(20);
  11.     pq.push(30);
  12.    
  13.     while(!pq.empty()) {
  14.         cout << pq.top() << " ";
  15.         pq.pop();
  16.     }
  17.     cout << endl;
  18.    
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement