struct d{ int x,y,h; }; struct cmp{ bool operator()(d a,d b){ return a.h>b.h; } }; priority_queue<d,vector<d>,cmp> q;
这样的一段代码,使得优先队列 qqq 的队首到队尾按照 hhh 升序排序,但是按照本蒟蒻的理解,应该把第六行改成return a.h<b.h才能实现上述效果啊,求教dalao