#include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; using namespace std; #define mod 1000003 #define INF 1000000000 #define LLINF 2000000000000000000LL #define SIZE 100 #define EPS 0 int n,x[2][SIZE],y[2][SIZE]; int ans=1; bool cross(int x1,int y1,int x2,int y2,int x3,int y3,int x4,int y4){ long long a,b,c,d; /*直線(x3,y3,x4,y4) と 線分(x1,y1,x2,y2)*/ a=(long long)(x3-x4)*(y1-y3)+(long long)(y3-y4)*(x3-x1); b=(long long)(x3-x4)*(y2-y3)+(long long)(y3-y4)*(x3-x2); /*直線(x1,y1,x2,y2) と 線分(x3,y3,x4,y4)*/ //c=(long long)(x1-x2)*(y3-y1)+(long long)(y1-y2)*(x1-x3); //d=(long long)(x1-x2)*(y4-y1)+(long long)(y1-y2)*(x1-x4); if(((a<0)^(b<0))) //|| abs(a)<=EPS || abs(b)<=EPS)) return true; else return false; } int calc(int a,int ak,int b,int bk){ int cc = 2; for(int i=0;i