結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー HAGI_TARO
提出日時 2021-09-12 15:11:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 89,344 KB
最終ジャッジ日時 2024-06-24 04:57:54
合計ジャッジ時間 2,952 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 14 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,x,y = map(int,input().split())
A = sorted(list(map(int,input().split())))
ans = []
more = 0
for i in A:
    if x > i > y:
        ans.append(i)
    elif x <= i:
        ans.append(i)
        more += 1
if len(ans) - more < len(ans) - m:
    print("Handicapped")
else:
    print(sum(ans[len(ans)-m:]))
0