func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 1e5 + 50;   const double eps = 1e-10;   const int max_index = 62;   const int inf = 0x3f3f3f3f;   const int MOD = 1e9 + 7;   inline int read() {     char c = getchar();     while (!isdigit(c)) c = getchar();     int x = 0;     while (isdigit(c)) {       x = x * 10 + c -  0 ;       c = getchar();     }     return x;   }   int N, n, m, K;   long long dp[55][55][1110];   long long C[55][55];   int main() {     scanf( %d%d , &N, &K);     n = m = 0;     for (int i = 0; i < N; i++) {       int x = read();       if (x == 50)         n++;       else         m++;     }     for (int i = 0; i <= 50; i++) C[i][0] = 1, C[i][i] = 1;     for (int i = 0; i <= 50; i++) {       for (int j = 1; j < i; j++) {         C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;       }     }     dp[n][m][0] = 1;     for (int k = 1; k < 200 && dp[0][0][k - 1] == 0; k++) {       bool flag = 0;       for (int i = 0; i <= n; i++) {         for (int j = 0; j <= m; j++) {           if (k & 1) {             for (int a = 0; a * 50 <= K && a + i <= n; a++) {               for (int b = 0; b * 100 + a * 50 <= K && b + j <= m; b++) {                 if (a == 0 && b == 0) continue;                 long long tmp = dp[i + a][j + b][k - 1] * C[i + a][a] % MOD *                                 C[j + b][b] % MOD;                 dp[i][j][k] = (dp[i][j][k] + tmp) % MOD;               }             }           } else {             for (int a = 0; a * 50 <= K && a <= i; a++) {               for (int b = 0; b * 100 + a * 50 <= K && b <= j; b++) {                 if (a == 0 && b == 0) continue;                 long long tmp = dp[i - a][j - b][k - 1] * C[n - i + a][a] % MOD *                                 C[m - j + b][b] % MOD;                 dp[i][j][k] = (dp[i][j][k] + tmp) % MOD;               }             }           }         }       }     }     int k = 0;     while (dp[0][0][k] == 0 && k < 200) k++;     if (k >= 200)       puts( -1 n0 );     else       cout << k <<   n  << dp[0][0][k] <<   n ;     return 0;   }   