Playground
#include <iostream> #include <queue> using namespace std; int main() { priority_queue<int> pq; pq.push(3); pq.push(2); pq.push(5); while (!pq.empty()) { cout << pq.top() << " "; //pechati '5 3 2 ' pq.pop(); } return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!