func_code_string: #include <bits/stdc++.h>   using namespace std;   inline int in() {     int32_t x;     scanf( %d , &x);     return x;   }   inline string get() {     char ch[1000010];     scanf( %s , ch);     return ch;   }   const int MAX_LG = 60;   const long long maxn = 1e6 + 100;   const long long base = 29;   const long long mod = 1e9 + 7;   const long long INF = 1e18 + 100;   struct state {     long long a = 0, b = 0, tp = 0;     state() {}     state(long long a, long long b, long long tp) : a(a), b(b), tp(tp) {}   };   long long cnt[maxn];   long long di[51][51][2];   long long C[51][51];   long long ways[51][51][2];   queue<state> q;   int32_t main() {     long long n = in(), k = in();     for (long long i = 0; i < n; i++) cnt[in() / 51]++;     q.push({cnt[0], cnt[1], 0});     for (long long i = 0; i <= 50; i++)       for (long long j = 0; j <= 50; j++) di[i][j][0] = di[i][j][1] = INF;     for (long long i = 0; i <= 50; i++) {       for (long long j = 0; j <= i; j++) {         if (j == 0)           C[i][j] = 1;         else           C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;       }     }     di[cnt[0]][cnt[1]][0] = 0;     ways[cnt[0]][cnt[1]][0] = 1;     while (q.empty() == false) {       state now = q.front();       q.pop();       long long a2 = cnt[0] - now.a;       long long b2 = cnt[1] - now.b;       for (long long i = 0; i <= now.a; i++) {         for (long long j = 0; j <= now.b; j++) {           if (i + j == 0) continue;           if (i * 50 + j * 100 > k) continue;           long long d2 = di[now.a][now.b][now.tp] + 1;           long long *d3 = &di[a2 + i][b2 + j][now.tp ^ 1];           if (*d3 == INF) {             *d3 = d2;             q.push({a2 + i, b2 + j, now.tp ^ 1});           }           if (*d3 == d2) {             ways[a2 + i][b2 + j][now.tp ^ 1] += ways[now.a][now.b][now.tp] *                                                 C[now.a][i] % mod * C[now.b][j] %                                                 mod;             if (ways[a2 + i][b2 + j][now.tp ^ 1] > mod)               ways[a2 + i][b2 + j][now.tp ^ 1] -= mod;           }         }       }     }     if (ways[cnt[0]][cnt[1]][1] == 0)       return cout << -1 <<   n  << 0 <<   n , 0;     else {       cout << di[cnt[0]][cnt[1]][1] <<   n ;       cout << ways[cnt[0]][cnt[1]][1] <<   n ;     }   }   