#include using namespace std; const int maxn=10005; struct Circle { double p,r,d; }; int n; double l,w; Circle c[maxn]; bool cmp(const Circle &a,const Circle &b) { return a.p-a.d=c[i].r) { n--; i--; continue; } c[i].d=sqrt(c[i].r*c[i].r-w*w/4); } sort(c,c+n,cmp); double now=0.0,maxd; int res=0,p=0; while(nownow) now=maxd; else break; } if(now