func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 210003;   double a[N], b[N];   int n;   double checkMa(double x) {     for (int i = 1; i <= n; i++) b[i] = a[i] - x;     double ans = 0, tpans = 0;     for (int i = 1; i <= n; i++) {       tpans += b[i];       if (tpans < 0) tpans = 0;       ans = max(ans, tpans);     }     for (int i = 1; i <= n; i++) b[i] = -b[i];     tpans = 0;     for (int i = 1; i <= n; i++) {       tpans += b[i];       if (tpans < 0) tpans = 0;       ans = max(ans, tpans);     }     return ans;   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       scanf( %lf , &a[i]);     }     double r = 10005, l = -10005;     int times = 100;     while (fabs(r - l) > 1e-13 && times) {       times--;       if (times <= 0) break;       double lm = (2.0 * l + r) / 3.0;       double rm = (2.0 * r + l) / 3.0;       if (checkMa(lm) < checkMa(rm)) {         r = rm;       } else         l = lm;     }     printf( %.10f n , checkMa(l));     return 0;   }   