优先队列
C++
priority_queue<int,vector<int>,greater<int> >pg;
priority_queue<int,vector<int>,less<int> >pg;
pg.push()//放入数据
pg.top()//顶层数据
pg.pop()//扔掉顶层数据
优先队列
C++
priority_queue<int,vector<int>,greater<int> >pg;
priority_queue<int,vector<int>,less<int> >pg;
pg.push()//放入数据
pg.top()//顶层数据
pg.pop()//扔掉顶层数据