struct node { int l; int r; } a[N]; bool cmp(node x,node y) { return x.l <y.l ; } sort(a,a+m,cmp);
这样子的排序就是升序
struct node{ int l,r; bool operate<(const node &x)const{ retunr l<x.l; } }a[1005];
同样也是升序哦!