#include #include #include #define EPS 0.0001 struct tree { double x,y; int v,l; } t[16]; int i,j,N; struct tree T; int main() { int M,minlost,lost,fence; int i0,i,j,k,knext; double obv; scanf("%d",&N); while (N) { for (i=0; it[j].x+EPS) { T=t[i]; t[i]=t[j]; t[j]=T; continue; } if (t[i].xt[j].y) { T=t[i]; t[i]=t[j]; t[j]=T; continue; } } /* for (i=0; i=minlost) continue; obv=0; for (i0=0; i0((t[knext].y-t[k].y)/(t[knext].x-t[k].x))) knext=j; } obv+=sqrt((t[knext].x-t[k].x)*(t[knext].x-t[k].x)+(t[knext].y-t[k].y)*(t[knext].y-t[k].y)); /* printf("Next %d\n",knext); */ k=knext; } if (obv>fence+EPS) continue; k=i0; while (1) { for (knext=k+1; knextfence+EPS) continue; minlost=lost; } printf("The lost value is %d.\n",minlost); scanf("%d",&N); } return 0; }