#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ; using ll = long long ; using ld = long double ; template using V = vector ; template using VV = V> ; using pll = pair ; #define all(v) v.begin(),v.end() ll mod = 1000000007 ; long double pie = acos(-1) ; ll INF = 1e18 ; void yorn(bool a){if(a) cout << "Yes" << endl ; else cout << "No" << endl ;} //void YorN(bool a){if(a) cout << "YES" << endl ; else cout << "NO" << endl ;} ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;} ll lcm(long long a,long long b){return a/gcd(a,b)*b ;} ll extGCD(ll a,ll b,ll &x,ll &y){ if(b==0){ x = 1 ; y = 0 ; return a ; } ll d = extGCD(b,a%b,y,x) ; y -= a/b*x ; return d ; } void fix_cout(){cout << fixed << setprecision(20) ;} template void chmax(T &a,T &b){if(a void chmin(T &a,T &b){if(a>b) a = b ;} int main(){ int n,m,x,y,z ; cin >> n >> m >> x >> y >> z ; V a(n) ; for(auto &i:a) cin >> i ; sort(all(a)) ; if(m!=n&&a[n-m-1]>=x) cout << "Handicapped" << endl ; else{ ll sum = 0 ; int cnt = 0 ; V b ; for(int i=0;i=x){ sum += a[i] ; cnt++ ; }else b.push_back(a[i]) ; } n = b.size() ; VV> dp(n+1,VV(n+1,V(50*n+1,0))) ; dp[0][0][0] = 1 ; for(int i=1;i<=n;i++){ dp[i] = dp[i-1] ; for(int j=0;j<=i-1;j++) for(int k=0;k<=50*n;k++){ dp[i][j+1][k+b[i-1]] += dp[i-1][j][k] ; } } ll ans = 0 ; for(int i=0;i<=n;i++){ if(i+cnt>m) break ; if(i+cnt==0) continue ; ll tmp = z*(cnt+i)-sum ; if(tmp<0||tmp>50*n) continue ; ans += dp[n][i][z*(cnt+i)-sum] ; } cout << ans << endl ; // for(auto i:dp[n]){ // for(int j=0;j<30;j++) cout << i[j] << " " ; cout << endl ; // } } }