#include using namespace std; long double eps = 1e-12; long double calc_area(long double l, long double r1, long double r2) { if (l + eps > r1 + r2) return 0; if (r1 + eps > l + r2) return (long double)M_PI * r2 * r2; if (r2 + eps > l + r1) return (long double)M_PI * r1 * r1; long double ct1 = (l * l + r1 * r1 - r2 * r2) / (2 * l * r1); long double ct2 = (l * l + r2 * r2 - r1 * r1) / (2 * l * r2); long double h = r1 * sqrtl(1 - ct1 * ct1); return r1 * r1 * acosl(ct1) + r2 * r2 * acosl(ct2) - l * h; } long double calc_area(long double l, long double r1s, long double r1l, long double r2s, long double r2l) { return calc_area(l, r1l, r2l) - calc_area(l, r1s, r2l) - calc_area(l, r1l, r2s) + calc_area(l, r1s, r2s); } int main() { int n; long long l; cin >> n >> l; assert(3 <= n && n <= 10000); assert(1 <= l && l <= 10000); vector v(n + 1), maxl(n + 2), maxr(n + 2), suml(n + 2), sumr(n + 2); for (int i = 0; i <= n; ++i) { cin >> v[i]; assert(1 <= v[i] && v[i] <= 10000); maxl[i + 1] = max(maxl[i], v[i]); suml[i + 1] = suml[i] + v[i]; } assert(getchar() == '\n'); assert(getchar() == EOF); for (int i = n; i >= 0; --i) { maxr[i] = max(maxr[i + 1], v[i]); sumr[i] = sumr[i + 1] + v[i]; } cout << setprecision(9); for (int i = 1; i <= n; ++i) cout << calc_area(l, max(maxl[i] * 2 - suml[i], 0LL), suml[i], max(maxr[i] * 2 - sumr[i], 0LL), sumr[i]) << "\n"; return 0; }