#include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define int long long #define double long double typedef vector VI; typedef pair pii; typedef vector VP; typedef vector VS; typedef priority_queue PQ; templatebool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } templatebool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define fore(i,a) for(auto &i:a) #define REP(i,n) for(int i=0;i, greater > q2; int dp[110][200010]; signed main() { cin.tie(0); ios::sync_with_stdio(false); int N, K; cin >> N >> K; VI A(N); REP(i, N) { cin >> A[i]; A[i] -= K; } dp[0][100000] = 1; REP(i, N) { int now = A[i]; eREP(j, 200000) { dp[i + 1][j] += dp[i][j]; dp[i + 1][j] %= mod; if (j + now <= 200000) { dp[i + 1][j + now] += dp[i][j]; dp[i + 1][j + now] %= mod; } } } int ans = 0; eFOR(i,100000,200000) { //if (dp[N][i])cout << i << " " << dp[N][i] << endl; ans += dp[N][i]; ans %= mod; } cout << (ans - 1 + mod) % mod << endl; return 0; }