結果
問題 | No.1454 ツブ消ししとるなEasy |
ユーザー |
👑 |
提出日時 | 2021-08-23 05:22:12 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 76 ms / 2,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 384 ms |
コンパイル使用メモリ | 82,348 KB |
実行使用メモリ | 88,448 KB |
最終ジャッジ日時 | 2024-11-07 04:58:21 |
合計ジャッジ時間 | 2,434 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
n, m, x, y = map(int, input().split())alst = list(map(int, input().split()))y_x = []x_ = []for a in alst:if a >= x:x_.append(a)elif a > y:y_x.append(a)if len(x_) > m:print("Handicapped")exit()ans = sum(x_)y_x.sort(reverse = True)ans += sum(y_x[:m - len(x_)])print(ans)