結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー O2MTO2MT
提出日時 2021-04-01 12:53:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 96,812 KB
最終ジャッジ日時 2023-08-22 16:41:31
合計ジャッジ時間 3,052 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,356 KB
testcase_01 AC 73 ms
71,132 KB
testcase_02 AC 74 ms
71,328 KB
testcase_03 AC 77 ms
71,040 KB
testcase_04 AC 99 ms
96,812 KB
testcase_05 AC 72 ms
71,228 KB
testcase_06 AC 72 ms
71,208 KB
testcase_07 AC 88 ms
87,752 KB
testcase_08 AC 94 ms
93,928 KB
testcase_09 AC 95 ms
93,880 KB
testcase_10 AC 73 ms
71,408 KB
testcase_11 AC 72 ms
71,348 KB
testcase_12 AC 71 ms
71,120 KB
testcase_13 AC 74 ms
71,300 KB
testcase_14 AC 74 ms
71,208 KB
testcase_15 AC 72 ms
71,304 KB
testcase_16 AC 74 ms
71,316 KB
testcase_17 AC 74 ms
71,160 KB
testcase_18 AC 74 ms
71,156 KB
testcase_19 AC 74 ms
71,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect
from itertools import accumulate
N,M,X,Y = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
by,bx = bisect(A,Y),bisect(A,X)
if M < N-bx:
    print("Handicapped")
else:
    AC = [0]+list(accumulate(A))
    print(AC[-1]-AC[max(N-M,by)])
0