#include<queue>
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
priority_queue<int,vector<int>,less<int> >q;//这里一定要有空格。
// 要大的
priority_queue<int,vector<int>,greater<int> >qq;
//要小的
q.push(1);//压入
q.pop();
//弹出
q.top();
//取首个元素
struct node
{
int c,d;
friend bool operator <(node a,node b)
{
return a.c>d.c;//取小的在前面
return a.c<d.c;//取大的在前面
}
};
struct cmp
{
bool operator()(int x,int y)
{
return x>y;//取小的在前面;
}
};
//与 vector<int>, greater<int>作用相同
}
while(!q.empty())
{
cout<<q.top()<<endl;
q.pop();
}