满足条件的一定是在凸包内的,直接判断
恬不知耻的加了特判,2333
#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#define N 50050
using namespace std;
int n,ss[N],top,topa,topb,ans1,ans2;
bool bo=0;
struct point{
double x,y;
}a[N],b[N],o,p[N];
double operator * (point a,point b){return a.x*b.y-b.x*a.y;}
point operator - (point a,point b){return (point){a.x-b.x,a.y-b.y};}
double dis(point a,point b){return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));}
bool operator < (point a,point b){
double s=(a-o)*(b-o);
if(s==0) return dis(a,o)<dis(b,o);
return s>0;
}
void graham(point *gy){
ss[++top]=1;
for(int i=2;i<=n;i++){
while(top>1&&(gy[i]-gy[ss[top-1]])*(gy[ss[top]]-gy[ss[top-1]])>0) top--;
ss[++top]=i;
}
}
bool ch