Advertisement
Josif_tepe

Untitled

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