优先队列

来源:互联网 发布:电脑玩手游用什么软件 编辑:程序博客网 时间:2024/04/28 13:15

priority_queue

empty();
pop();
pop();
push();

  • 默认为大顶堆
priority_queue<int> q;
  • 仿函数
struct cmp{    bool operator() (path a, path b)    {        return a.f > b.f;    }};
0 0