有关排序函数cmp写法

来源:互联网 发布:ubuntu查看防火墙状态 编辑:程序博客网 时间:2024/06/05 08:26

可以作为类型名的写法(直接作为优先队列排序的一部分)

typedef long long LL;struct cmp{    bool operator()(const LL a,const LL b)const    {        return a > b;    }};······priority_queue<LL, vector<LL>,**cmp**>pq;

具体代码