#include #include int n; double L[1002]; double f(double d, double r1, double r2) { if (r1 < 1e-8 || r2 < 1e-8 || r1 + r2 < d + 1e-8) return 0; if (d + r2 < r1 + 1e-8) return r2*r2*acos(-1); if (d + r1 < r2 + 1e-8) return r1*r1*acos(-1); double A = acos((r1*r1+d*d-r2*r2)/(2*r1*d)); double B = acos((r2*r2+d*d-r1*r1)/(2*r2*d)); return r1*r1*A-r1*r1*cos(A)*sin(A) + r2*r2*B-r2*r2*cos(B)*sin(B); } int main() { int n; scanf("%d", &n); for (int i = 0; i <= n + 1; i++) { scanf("%lf", L + i); } for (int i = 1; i <= n; i++) { double mxL = 0; double smL = 0; double mxR = 0; double smR = 0; for (int j = 1; j <= i; j++) { mxL = fmax(mxL, L[j]); smL += L[j]; } for (int j = i + 1; j <= n + 1; j++) { mxR = fmax(mxR, L[j]); smR += L[j]; } double mnL = fmax(0.0, 2*mxL - smL); double mnR = fmax(0.0, 2*mxR - smR); double ans = 0; ans += f(L[0], smL, smR); ans -= f(L[0], smL, mnR); ans -= f(L[0], mnL, smR); ans += f(L[0], mnL, mnR); printf("%.15f\n", ans); } }