#include #include using namespace std; #define max(a,b) ((a)>=(b)?(a):(b)) const int maxn = 50000; struct node { double x, y; }pt[maxn+5]; bool set(double &tl, double &tr, double cl, double cr) { if (cl>tr || tl>cr) return false; if (tr>cr) tr = cr; if (tl1e-9) { mid = (low+high)/2; if (ok(mid, n, p)) { d = mid; high = mid; } else low = mid; } } int main() { int n; int i; double p, d; while(scanf("%d", &n)!=EOF) { if (n==0) break; for (i=0; i