10
-405 -230 252 -393 -390 -259 97 163 81 -129
 3
10000 -10000 10000
 1
-10000
 20
-16 -23 29 44 -40 -50 -41 34 -38 30 -12 28 -44 -49 15 50 -28 38 -2 0

702.333333333333712
 10000.000000000016371
 0.000000000000000
 113.875000000000043

#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
int n, a[MAXN];
int main() {
  n = 200000;
  for (int i = 0; i < n; i++) a[i] = 0;
  long double L = -20000, R = 20000;
  while (fabsl(R - L) > 1e-9) {
    long double mid = (L + R) / 2;
    long double X = -5e9, Y = -5e9;
    long double LX = 0, LY = 0;
    for (int i = 0; i < n; i++) {
      LX = (a[i] + mid) + max(LX, (long double)0.0);
      X = max(X, LX);
      LY = (-a[i] - mid) + max(LY, (long double)0.0);
      Y = max(Y, LY);
    }
    if (X <= Y)
      L = mid;
    else
      R = mid;
  }
  long double X = -5e9, Y = -5e9;
  long double LX = 0, LY = 0;
  for (int i = 0; i < n; i++) {
    LX = (a[i] + L) + max(LX, (long double)0.0);
    X = max(X, LX);
    LY = (-a[i] - L) + max(LY, (long double)0.0);
    Y = max(Y, LY);
  }
  printf("%.15Lf\n", max(X, Y));
  return 0;
}
