public class Main { private static void solve() { int n = ni(); double d = ni(); double[] l = new double[n + 1]; for (int i = 0; i <= n; i ++) { l[i] = ni(); } //0:left min, 1:left max, 2:right min, 3:right max double[][] r = new double[n][4]; for (int i = 0; i < n; i ++) { double sumLeft = 0; double maxLeft = 0; double sumRight = 0; double maxRight = 0; for (int j = 0; j <= i; j ++) { sumLeft += l[j]; maxLeft = Math.max(maxLeft, l[j]); } for (int j = i + 1; j <= n; j ++) { sumRight += l[j]; maxRight = Math.max(maxRight, l[j]); } r[i][0] = Math.max(maxLeft * 2 - sumLeft, 0); r[i][1] = sumLeft; r[i][2] = Math.max(maxRight * 2 - sumRight, 0); r[i][3] = sumRight; } for (int i = 0; i < n; i ++) { double ret = 0; ret += s(r[i][1], r[i][3], d); ret -= s(r[i][0], r[i][3], d); ret -= s(r[i][1], r[i][2], d); ret += s(r[i][0], r[i][2], d); System.out.printf("%.9f\n", ret); } } private static double s(double r1, double r2, double d) { if (r1 + r2 <= d) return 0; if (Math.max(r1, r2) - Math.min(r1, r2) >= d) { double r = Math.min(r1, r2); return r * r * Math.PI; } double theta1 = Math.acos((r1 * r1 + d * d - r2 * r2) / (2 * r1 * d)); double theta2 = Math.acos((r2 * r2 + d * d - r1 * r1) / (2 * r2 * d)); double ret = 0; ret += r1 * r1 * (theta1 - Math.sin(theta1 * 2) / 2); ret += r2 * r2 * (theta2 - Math.sin(theta2 * 2) / 2); return ret; } public static void main(String[] args) { new Thread(null, new Runnable() { @Override public void run() { long start = System.currentTimeMillis(); String debug = args.length > 0 ? args[0] : null; if (debug != null) { try { is = java.nio.file.Files.newInputStream(java.nio.file.Paths.get(debug)); } catch (Exception e) { throw new RuntimeException(e); } } reader = new java.io.BufferedReader(new java.io.InputStreamReader(is), 32768); solve(); out.flush(); tr((System.currentTimeMillis() - start) + "ms"); } }, "", 64000000).start(); } private static java.io.InputStream is = System.in; private static java.io.PrintWriter out = new java.io.PrintWriter(System.out); private static java.util.StringTokenizer tokenizer = null; private static java.io.BufferedReader reader; public static String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new java.util.StringTokenizer(reader.readLine()); } catch (Exception e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } private static double nd() { return Double.parseDouble(next()); } private static long nl() { return Long.parseLong(next()); } private static int[] na(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = ni(); return a; } private static char[] ns() { return next().toCharArray(); } private static long[] nal(int n) { long[] a = new long[n]; for (int i = 0; i < n; i++) a[i] = nl(); return a; } private static int[][] ntable(int n, int m) { int[][] table = new int[n][m]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { table[i][j] = ni(); } } return table; } private static int[][] nlist(int n, int m) { int[][] table = new int[m][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { table[j][i] = ni(); } } return table; } private static int ni() { return Integer.parseInt(next()); } private static void tr(Object... o) { if (is != System.in) System.out.println(java.util.Arrays.deepToString(o)); } }