func_code_string: #include <bits/stdc++.h>   using namespace std;   char z[500005];   int Qs1[500005], b, Qs2[500005];   int f(char a) {     if (a ==  w ) return b + 1;     return 1;   }   int main() {     int i, j, n, a, t, Max = 0;     int *qs2 = Qs2 + 1, *qs1 = Qs1 + 1;     scanf( %d %d %d %d  , &n, &a, &b, &t);     gets(z);     qs1[0] = f(z[0]);     for (i = 1; i < n; i++) {       qs1[i] = a + f(z[i]) + qs1[i - 1];     }     for (i = n - 1; i >= 0; i--) {       qs2[n - 1 - i] = a + f(z[i]) + qs2[n - 2 - i];     }     for (i = 0; i < n; i++) {       if (qs1[i] <= t) Max = max(min(i + 1, n), Max);       if (qs2[i] + qs1[0] <= t) Max = max(min(i + 2, n), Max);     }     for (i = 0; i < n; i++) {       int tmp = lower_bound(qs2, qs2 + n, t - qs1[i] - a * i) - qs2;       if (t - qs1[i] - a * i < qs2[tmp]) tmp--;       if (tmp == -1) continue;       Max = max(min(tmp + i + 2, n), Max);     }     for (i = 0; i < n; i++) {       int tmp = lower_bound(qs1, qs1 + n, t - qs2[i] - a * i - a) - qs1;       if (t - qs2[i] - a * i - a < qs1[tmp]) tmp--;       if (tmp == -1) continue;       Max = max(min(tmp + i + 2, n), Max);     }     printf( %d , Max);     return 0;   }   