Josif_tepe

Untitled

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