#include #include using namespace std; const int N=510,inf=10000000; struct P{ int x,y; P(){} P(int _x,int _y){x=_x,y=_y;} P operator+(const P&b){return P(x+b.x,y+b.y);} P operator-(const P&b){return P(x-b.x,y-b.y);} int operator*(const P&b){return x*b.x+y*b.y;} }a[N],b[N],p[N],pp[N],hull[N],pivot; int n,m,cnt,i,j,k,tmp,d[N][N],ans; bool flag; inline int cross(const P&A,const P&B){ return A.x*B.y-A.y*B.x; } inline int cross(const P&A,const P&B,const P&C){ return (B.x-A.x)*(C.y-A.y)-(B.y-A.y)*(C.x-A.x); } inline int distsqr(const P&A,const P&B){ return (A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y); } inline bool cmp(const P&a,const P&b){ int t=cross(pivot,a,b); return t>0||(t==0&&distsqr(pivot,a)=0)--t; q[++t]=pp[i]; } m=t+1; } inline bool point_on_segment(P p,P a,P b){ return cross(b-a,p-a)==0&&(p-a)*(p-b)<=0; } inline bool inhull(const P&x){ for(int i=0;i>5]^=1U<<(x&31); } int get(int x){return a[x>>5]>>(x&31)&1;} }g[N],vis; int h,t,z,q[N],f[N]; inline void add(int x){ vis.flip(x); q[++t]=x; f[x]=z; } inline void bfs(int S){ int i,x; unsigned int y; vis.clr(); h=1,t=0; for(i=0;i1){ if(same_line(b[0],b[1])){ flag=1; } } for(i=0;i