struct gd{ double x,y; }; bool cmp(const gd &a,const gd &b) { return [&a,&b](const gd &a,const gd &b)->bool{ if(fabs(a.x-b.x)<1e-6) return (a.y-b.y<-1e-6); else return (a.x-b.x<-1e-6); }; } set<gd, decltype(cmp)* >...