func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 100010;   int n, d, b;   long long sum[N];   inline int gi() {     int x = 0, o = 1;     char ch = getchar();     while (ch !=  -  && (ch <  0  || ch >  9 )) ch = getchar();     if (ch ==  - ) o = -1, ch = getchar();     while (ch >=  0  && ch <=  9 ) x = x * 10 + ch -  0 , ch = getchar();     return x * o;   }   inline int check(int mid) {     int g = (n + 1) / 2, s1 = 0, s2 = 0;     for (int i = 1; i <= g; i++) {       int f1, f2;       f1 = sum[min(i + 1LL * d * i, (long long)n)] - 1LL * s1 * b;       f2 = sum[n] - sum[max(0LL, n - i - 1LL * d * i)] - 1LL * s2 * b;       if (i == n - i + 1)         s1 += (f1 >= b);       else {         if (s1 < mid + n % 2) s1 += (f1 >= b);         if (s2 < mid) s2 += (f2 >= b);       }     }     if (s1 >= mid + n % 2 && s2 >= mid) return 1;     return 0;   }   int main() {     cin >> n >> d >> b;     for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + gi();     int l = 0, r = n / 2, ans = (n + 1) / 2;     while (l <= r) {       int mid = (l + r) >> 1;       if (check(mid))         l = mid + 1, ans = n / 2 - mid;       else         r = mid - 1;     }     cout << ans;     return 0;   }   