#include <iostream>
#include <functional>
#include <queue>
using std::cout;
using std::endl;
using std::priority_queue;
int main()
{
priority_queue<int, std::vector<int>, std::greater<int> > pque;
pque.push(1);
pque.push(5);
pque.push(3);
pque.push(2);
pque.push(6);
while (!pque.empty()) {
cout << pque.top() << endl;
pque.pop();
}
cout << endl;
return 0;
}
/*
run:
1
2
3
5
6
*/