func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( O3 )   using namespace std;   int n, a[200005];   long double eps = 1e-11, b[200005], s[200005];   long double f(long double first) {     long double mn = 0, ans = 0;     for (int i = 1; i <= n; i++) {       b[i] = -first + a[i];       s[i] = s[i - 1] + b[i];       ans = max(ans, abs(s[i] - mn));       mn = min(mn, s[i]);     }     mn = 0;     for (int i = 1; i <= n; i++) {       ans = max(ans, abs(s[i] - mn));       mn = max(mn, s[i]);     }     return ans;   }   int32_t main() {     ios_base ::sync_with_stdio(0);     cin.tie();     cout.tie();     cin >> n;     for (int i = 1; i <= n; i++) {       cin >> a[i];     }     long double l = -1e9, r = 1e9;     for (int i = 1; i <= 200; i++) {       long double mid1 = (l * 2 + r) / 3, mid2 = (l + r * 2) / 3;       if (f(mid1) > f(mid2))         l = mid1;       else if (f(mid1) < f(mid2))         r = mid2;       else         l = mid1, r = mid2;     }     cout << fixed << setprecision(7) << f(l);   }   