优先队列及改变优先级

时间:2019-09-03 00:49:41   收藏:0   阅读:120
priority_queue<int>que//默认最大的先出来 
priority_queue<int,vector<int>,greater<int> >que;///最小的先出来 
struct node{
    int x,y;
    bool operator < (const node &b)const{
        return x<b.x;///大的先出来 
    }
}x1,x2,x3;

 

原文:https://www.cnblogs.com/starve/p/11450456.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!