func_code_string: #include <bits/stdc++.h>   #pragma comment(linker,  /STACK:36777216 )   using namespace std;   int n, m;   long long f[2005][2005], sum[2005][2005];   char ch[2005];   int main() {     cin >> n >> m;     scanf(  %s , ch + 1);     f[0][0] = 1;     for (int i = 0; i <= n; i++) sum[i][0] = 1;     for (int i = 1; i <= n; i++)       for (int j = 0; j <= m; j++) {         if (i != n)           f[i][j] += sum[i - 1][j] * (ch[i] -  a ), f[i][j] %= 1000000007;         if (i == n)           f[i][j] += sum[i - 1][j] * (ch[i] -  a  + 1), f[i][j] %= 1000000007;         for (int k = 0; j - (n - i + 1) * (k + 1) >= 0 && i - 1 - k >= 0; k++) {           f[i][j] += f[i - 1 - k][j - (n - i + 1) * (k + 1)] * ( z  - ch[i]);           f[i][j] %= 1000000007;         }         sum[i][j] = sum[i - 1][j] + f[i][j];         sum[i][j] %= 1000000007;       }     cout << f[n][m] << endl;   }   