#include #include #include using namespace atcoder; using mint = modint; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000000000000000 template vector convolution_mint(vector a,vector b){ vector a1(a.size()),a2(a.size()),b1(b.size()),b2(b.size()); rep(i,a.size()){ a1[i] = a[i].val()>>15; a2[i] = a[i].val()&((1<<15)-1); } rep(i,b.size()){ b1[i] = b[i].val()>>15; b2[i] = b[i].val()&((1<<15)-1); } vector A = convolution_ll(a1,b1), C = convolution_ll(a2,b2); rep(i,a1.size())a1[i] += a2[i]; rep(i,b1.size())b1[i] += b2[i]; vector B = convolution_ll(a1,b1); rep(i,B.size()){ B[i] -= A[i] + C[i]; } vector ret(A.size(),0); rep(i,A.size()){ ret[i] += (long long)T(A[i]).val()<<30; ret[i] += (long long)T(B[i]).val()<<15; ret[i] += T(C[i]).val(); } return ret; } int main(){ mint::set_mod(1234567891); int n; cin>>n; long long m; cin>>m; vector a(n); rep(i,n)cin>>a[i]; vector dp(25005,0); dp[0] = 1; rep(i,n){ vector ndp(25005,0); rep(j,dp.size()){ if(dp[j]==0)continue; ndp[j] += dp[j]; ndp[j+a[i]] += dp[j]; } swap(dp,ndp); } vector ddp(25005,0); ddp[0] = 1; while(m!=0){ vector ndp = convolution_mint(dp,ddp); vector temp(25005,0); rep(i,ndp.size()){ if(i%2!=m%2)continue; temp[i>>1] = ndp[i]; } swap(temp,ddp); m>>=1; } cout<