#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int a[55]; long long dp[55][2550] = {}; int main() { int n, m, x, y, z, sum = 0, co = 0, co1 = 0; cin >> n >> m >> x >> y >> z; for (int i = 0; i < n; i++) { cin >> a[i]; if (a[i] > y) { sum += a[i]; co++; } if (a[i] >= x) { co1++; } } if (co1 > m) { cout << "Handicapped" << endl; return 0; } dp[co][sum] = 1; for (int i = 0; i < n; i++) { if (a[i] > y) { if (a[i] < x) { for (int j = 0; j < n; j++) { for (int k = 0; k <= sum; k++) { dp[j][k] += dp[j + 1][k + a[i]]; } } } } } long long ans = 0; for (int i = 1; i <= m; i++) { ans += dp[i][i * z]; } cout << ans << endl; }