結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-09-12 15:11:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 97,868 KB
最終ジャッジ日時 2023-09-06 10:22:29
合計ジャッジ時間 3,712 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,212 KB
testcase_01 AC 66 ms
71,112 KB
testcase_02 AC 62 ms
71,212 KB
testcase_03 AC 66 ms
71,084 KB
testcase_04 AC 91 ms
97,868 KB
testcase_05 WA -
testcase_06 AC 63 ms
71,344 KB
testcase_07 AC 92 ms
94,308 KB
testcase_08 AC 89 ms
89,016 KB
testcase_09 AC 89 ms
89,056 KB
testcase_10 AC 66 ms
71,204 KB
testcase_11 AC 69 ms
71,352 KB
testcase_12 AC 67 ms
71,348 KB
testcase_13 AC 65 ms
71,408 KB
testcase_14 AC 69 ms
71,220 KB
testcase_15 AC 66 ms
70,980 KB
testcase_16 AC 67 ms
71,220 KB
testcase_17 AC 69 ms
71,084 KB
testcase_18 WA -
testcase_19 AC 66 ms
71,312 KB
権限があれば一括ダウンロードができます

ソースコード

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