Advertisement
Shiam7777777

Untitled

Jan 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. priority_queue< int > q;
  2.     q.push( 10230 ); // inserting 10230
  3.     q.push( 1021 ); // inserting 1021
  4.     q.push( 102322 ); // inserting 102322
  5.    
  6.     while( !q.empty() ) {
  7.         cout << q.top() << endl; // printing the top
  8.         q.pop(); // removing that one
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement