func_code_string: #include <bits/stdc++.h>   const long long INF = 1e17, N = 2e5 + 1;   using namespace std;   int a[N], n, m, k, sum[N], t[N];   int getime(int idx) { return min(idx, n - idx + 1); }   int getlen(int l, int r) {     if (l > r) swap(l, r);     int tmp = (r - l) / m;     if ((r - l) % m != 0) tmp++;     return tmp;   }   int f(int tmp) {     for (int i = 1; i <= n; i++) {       sum[i] = 0;     }     for (int i = 1; i <= n; i++) {       a[i] = t[i];     }     int idx = 1;     for (int i = (n / 2) - tmp + 1; i <= ((n + 1) / 2) + tmp; i++) {       while (sum[i] != k && idx <= n) {         if (a[idx] == 0 || getlen(idx, i) > getime(i)) {           idx++;         } else {           int tmp = min(k - sum[i], a[idx]);           a[idx] -= tmp;           sum[i] += tmp;         }       }       if (sum[i] != k) {         return 0;       }     }     return 1;   }   int main() {     cin >> n >> m >> k;     for (int i = 1; i <= n; i++) {       cin >> t[i];     }     int l = 0, r = n / 2;     while (l != r) {       int mid = (l + r + 1) >> 1;       if (f(mid)) {         l = mid;       } else {         r = mid - 1;       }     }     cout << (n / 2) - l;   }   