func_code_string: #include <bits/stdc++.h>   using namespace std;   const int inv = 1000000000;   const int minv = -inv;   const int max_n = 500000 + 5;   const int max_cn2 = max_n / 2 + 5;   int n, cn2, fn2;   int a[max_cn2];   int x;   long long q[max_cn2];   int main() {     scanf( %d , &n);     cn2 = (n + 1) / 2;     fn2 = n / 2;     long long suma = 0ll;     for (int i = 0; i < cn2; ++i) {       scanf( %d , &a[i]);       suma += ((long long)(a[i]));     }     scanf( %d , &x);     suma += ((long long)(fn2)) * ((long long)(x));     if (suma > 0ll) {       printf( %d n , n);       return 0;     }     if (x >= 0) {       printf( %d n , -1);       return 0;     }     q[0] = 0ll;     for (int i = 1; i < n - fn2; ++i)       q[i] = min(q[i - 1] + ((long long)(a[i - 1] - x)), 0ll);     long long rsum = ((long long)(fn2)) * ((long long)(x));     for (int k = fn2 + 1; k < n; ++k) {       rsum += ((long long)(a[n - k]));       if (rsum + q[n - k] > 0ll) {         printf( %d n , k);         return 0;       }     }     printf( %d n , -1);     return 0;   }   