排序不要写成
bool cmp(pt u,pt v){return u.x<v.x;}
在 x 坐标相同的情况下要排 y 坐标。
bool cmp(pt u,pt v){return u.x==v.x?u.y<v.y:u.x<v.x;}