#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (beps) return counter_clockwise; if(cross(a,b)<-eps) return clockwise; if(dot(a,b)<-eps) return online_back; if(a.norm() segCrossPpoints(Circle c,Line l){ //assert(intersect(c,l)); Vector pr=project(l,c.c); Vector e=(l.p2-l.p1)/abs(l.p2-l.p1); double base=sqrt(c.r*c.r-norm(pr-c.c)); return make_pair(pr+e*base,pr-e*base); } double arg(Vector p){return atan2(p.y,p.x);} Vector polar(double a,double r){return Point(cos(r)*a,sin(r)*a);} pair getCrossPoints(Circle c1,Circle c2){ //assert(intersect(c1,c2)); double d=abs(c1.c-c2.c); double a=acos((c1.r*c1.r+d*d-c2.r-c2.r)/(2*c1.r*d)); double t=arg(c2.c-c1.c); return make_pair(c1.c+polar(c1.r,t+a),c1.c+polar(c1.r,t-a)); } typedef vector Polygon; /* IN 2 ON 1 OUT 0 */ int contains(Polygon g,Point p){ int n=int(g.size()); bool x=false; for(int i=0;ib.y) swap(a,b); if(a.yeps) x=!x; } return (x?2:0); } Polygon andrewScan(Polygon s,bool ok){ Polygon u,l; sort(all(s)); if(int(s.size())<3) return s; int n=int(s.size()); u.push_back(s[0]); u.push_back(s[1]); l.push_back(s[n-1]); l.push_back(s[n-2]); if(ok){ for(int i=2;i=2&&ccw(u[j-2],u[j-1],s[i])==counter_clockwise;j--){ u.pop_back(); } u.push_back(s[i]); } for(int i=int(s.size())-3;i>=0;i--){ for(int j=int(l.size());j>=2&&ccw(l[j-2],l[j-1],s[i])==counter_clockwise;j--){ l.pop_back(); } l.push_back(s[i]); } } if(!ok){ for(int i=2;i=2&&ccw(u[j-2],u[j-1],s[i])!=clockwise;j--){ u.pop_back(); } u.push_back(s[i]); } for(int i=int(s.size())-3;i>=0;i--){ for(int j=int(l.size());j>=2&&ccw(l[j-2],l[j-1],s[i])!=clockwise;j--){ l.pop_back(); } l.push_back(s[i]); } } reverse(all(l)); for(int i=int(u.size())-2;i>=1;i--) l.push_back(u[i]); return l; }//ok==1なら辺の上も含める int main(){ std::ifstream in("text.txt"); std::cin.rdbuf(in.rdbuf()); cin.tie(0); ios::sync_with_stdio(false); int N;cin>>N; vector S(N); for(int i=0;i>S[i].x>>S[i].y; int ans=2; for(int i=0;i