func_code_string: #include <bits/stdc++.h>   long long k, L, R, a[2222222], b[2222222], ans, sum[2222222];   int n, r;   long long min(long long a, long long b) { return a < b ? a : b; }   long long max(long long a, long long b) { return a > b ? a : b; }   bool check(long long x) {     long long ans = 0, now = 0;     memset(b, 0, sizeof(b));     for (int i = 1; i <= n; i++) {       now += b[i];       if (a[i] + now < x)         ans += x - a[i] - now, b[i + 2 * r + 1] -= x - a[i] - now,             now += x - a[i] - now;       if (ans > k) return 0;     }     return 1;   }   int main() {     scanf( %d%d%lld , &n, &r, &k);     L = 2e18;     for (int i = 1; i <= n; i++)       scanf( %lld , &sum[i]), L = min(L, sum[i]), sum[i] += sum[i - 1];     for (int i = 1; i <= n; i++)       a[i] = sum[min(i + r, n)] - sum[max(0, i - r - 1)];     R = 1e20;     while (L <= R) {       long long mid = L + R >> 1;       if (check(mid))         L = mid + 1, ans = mid;       else         R = mid - 1;     }     printf( %lld n , ans);   }   