結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー sushitoruna
提出日時 2021-03-22 00:53:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 308 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,748 KB
最終ジャッジ日時 2024-11-22 21:05:45
合計ジャッジ時間 1,599 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, x, y = map(int, input().split())
a = list(map(int, input().split()))
cnt = ans = 0
v = []

for i in a:
    if i > y:
        v.append(i)
    if a>=x:
        cnt += 1

if cnt > m:
    ans = "Handicapped"
else:
    v.sort(reverse=True)
    for i in range(min(m, len(v))):
        ans += v[i]

print(ans)
0