/* -*- coding: utf-8 -*- * * 1454.cc: No.1454 ツブ消ししとるなEasy - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 100000; /* typedef */ typedef long long ll; /* global variables */ int as[MAX_N]; /* subroutines */ /* main */ int main() { int n, m, x, y; scanf("%d%d%d%d", &n, &m, &x, &y); for (int i = 0; i < n; i++) scanf("%d", as + i); sort(as, as + n); int k = lower_bound(as, as + n, x) - as; if (n - k > m) { puts("Handicapped"); return 0; } int l = max(upper_bound(as, as + n, y) - as, n - m); ll sum = 0; for (int i = l; i < n; i++) sum += as[i]; printf("%lld\n", sum); return 0; }