func_code_string: #include <bits/stdc++.h>   using namespace std;   int32_t main() {     long long int n, i, k, ans = -1, x, l, sum;     cin >> n;     long long int a[n + 2];     a[0] = 0;     long long int ca[n + 2];     ca[0] = 0;     l = (n + 1) / 2;     for (i = 1; i <= n; i++) {       if (i <= l) {         cin >> a[i];       } else {         a[i] = x;       }       ca[i] = ca[i - 1] + a[i];       if (i == l) cin >> x;     }     long long int mn[n + 2];     mn[0] = 0;     for (i = 1; i <= l; i++) {       sum = i * x - ca[i];       mn[i] = min(mn[i - 1], sum);     }     for (i = l; i <= n; i++) {       sum = ca[i];       k = n - i;       sum += mn[k];       if (sum > 0) {         ans = i;       }     }     cout << ans;     return 0;   }   