优先队列的结构体排序使用方法(经过重载的方法,排序结果与普通数组排序sort正好相反)

#include <bits/stdc++.h> using namespace std; struct node { int a,b; bool operator < (const node &th) const{ if(a != th.a) return a < th.a; return b > th.b; } }; int main(){ int n; while(cin
相关文章
相关标签/搜索