骚操作

sort排序:

struct node{int a,b,c;}s[N];
sort(s,s+n,[](node x,node y){return x.a<y.a;});

即可少写cmp函数

猜你喜欢

转载自www.cnblogs.com/acjiumeng/p/9260680.html