#include #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int main() { int N, M, X, Y, Z, base = 0, C = 0; cin >> N >> M >> X >> Y >> Z; vector A(N), B(0); rep(i, N) cin >> A[i]; rep(i, N) { if (A[i] <= Y) continue; if (A[i] >= X) { base += A[i]; C++; } else { B.push_back(A[i]); } } if (M < C) { cout << "Handicapped\n"; return 0; } N = B.size(); vector>> dp(N + 1, vector>(M - C + 2, vector(2501, 0))); dp[0][0][base] = 1; rep(i, N) { rep(j, M - C + 1) { rep(k, 2501) { dp[i + 1][j][k] += dp[i][j][k]; dp[i + 1][j + 1][k + B[i]] += dp[i][j][k]; } } } ll ans = 0; for (int j = 1; j <= M - C; j++) { ans += dp[N][j][Z * (C + j)]; } cout << ans << "\n"; /* rep(i, N + 1) { rep(j, M - C + 2) { rep(k, 22) { cout << dp[i][j][k] << " "; } cout << "\n"; } cout << "\n"; } */ }