#include #include #include using namespace std; int main(){ int n,m,x,y;cin>>n>>m>>x>>y; vector A(n); for(int i = 0; n > i; i++){ cin>>A[i]; } sort(A.begin(),A.end()); auto s = upper_bound(A.begin(),A.end(),y); auto t = lower_bound(A.begin(),A.end(),x); if(A.end()-t > m){ cout << "Handicapped" << endl; return 0; } long long ans = 0; for(int i = A.size()-1; 0 <= i; i--){ if(A[i] <= y || A.size()-1-i >= m){ cout << ans << endl; return 0; } ans += A[i]; } cout << ans << endl; }