bool cmp(road a,road b){ if(a.t<b.t) return 1; return 0; } struct road{ int x,y,t; }f[10005];
sort 之前 f[a].t:
6 4 5 3
之后:
2 2 3 4