二维数据排序
struct point{
int x;
int y;
}
C++::
Bool cmp(point i,point j){
return i.x<j.x;
}
sort(a,a+n,cmp);
JAVA::
Comparator<point> cmp=new Comparator<point>(){
public int compare(point i, point j){
return i.x-j.x;
}
};
Arrays.sort(a,0,n,cmp);