func_code_string: #include <bits/stdc++.h>   const int p = 1000000007;   int c[1105][1105], d[1005], f[1005][50][1005];   int h, i, j, k, m, n, s, t;   int main() {     d[0] = 1;     for (i = 1; i <= 1001; i++) d[i] = 1LL * i * d[i - 1] % p;     for (i = 0; i <= 1100; i++)       for (j = 0; j <= i; j++)         if ((j == 0) && (j == i))           c[i][j] = 1;         else           c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % p;     f[0][0][1] = 1;     for (j = 0; j < 50; j++)       for (i = 0; i <= 1000; i++)         for (k = 1; k <= 1001; k++) {           f[i][j][k] = (f[i][j][k] + f[i][j][k - 1]) % p;           if (i + k <= 1000)             f[i + k][j + 1][k + 1] = (f[i + k][j + 1][k + 1] + f[i][j][k]) % p;         }     scanf( %d , &t);     for (h = 1; h <= t; h++) {       scanf( %d%d , &n, &m);       if (m >= 50)         printf( 0 n );       else {         s = 0;         for (i = 0; i <= n; i++)           s = (s + 1LL * f[i][m][1001] * d[m] % p * c[n - i + m][m] % p) % p;         printf( %d n , s);       }     }     return 0;   }   