#include #include #include using namespace std; struct node { int x,y; }a[110],stack1[110]; double distan(node a,node b) { return (double)sqrt((a.x-b.x)*(a.x-b.x)*1.0+(a.y-b.y)*(a.y-b.y)*1.0); } double across(node a,node n1,node n2) { return (n1.x-a.x)*(n2.y-a.y) - (n1.y-a.y)*(n2.x-a.x); } bool cmp(node a1,node b1) { double k=across(a[0],a1,b1); if(k>0) return true; else if (k==0&&distan(a[0],a1)=2 && (across(stack1[head-1],stack1[head],a[i])<=0)) head--; stack1[++head]=a[i]; } for(i=0;i