#pragma GCC optimize("Ofast") #include #define endl '\n' #define X first #define Y second using namespace std; void fileIO() { freopen("triangle.in", "r", stdin); freopen("triangle.out", "w", stdout); } void fastIO() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } const double PI=acos(-1); const int MAXN=1505; int n; pair p[MAXN]; pair q[MAXN]; pair centr; int dist(pair a,pair b) { int dx=a.X-b.X; int dy=a.Y-b.Y; return dx*dx+dy*dy; } int det(pair c,pair a,pair b) { return (a.X-c.X)*(b.Y-c.Y)-(a.Y-c.Y)*(b.X-c.X); } int adet(pair c,pair a,pair b) { int ret=det(c,a,b); if(ret<0) return -ret; return ret; } bool cmpdet(pair a,pair b) { int d=det(p[1],a,b); if(!d) return dist(a,p[1])0; } double getAngle(pair a) { a.X-=centr.X; a.Y-=centr.Y; if(a.X==0 && a.Y==0) return 0; double ret=atan2(a.Y, a.X); if(ret<0) ret+=2*PI; return ret; } bool cmp(pair a,pair b) { int ang1=getAngle(a); int ang2=getAngle(b); if(ang1ang2) return 0; return dist(centr,a)>n; for(int i=1;i<=n;i++) { cin>>p[i].X>>p[i].Y; q[i]=p[i]; } int ind=1; for(int i=1; i<=n; i++) { if(p[i].X>tt; while(tt--) { solve(); } return 0; }