結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー miya145592miya145592
提出日時 2023-05-09 00:06:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 87,248 KB
実行使用メモリ 90,764 KB
最終ジャッジ日時 2023-08-16 22:19:50
合計ジャッジ時間 4,316 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,152 KB
testcase_01 AC 92 ms
71,552 KB
testcase_02 AC 94 ms
71,376 KB
testcase_03 AC 92 ms
71,576 KB
testcase_04 AC 116 ms
90,764 KB
testcase_05 AC 92 ms
71,548 KB
testcase_06 AC 92 ms
71,620 KB
testcase_07 AC 114 ms
88,992 KB
testcase_08 AC 118 ms
89,452 KB
testcase_09 AC 116 ms
89,628 KB
testcase_10 AC 92 ms
71,624 KB
testcase_11 AC 91 ms
71,584 KB
testcase_12 AC 91 ms
71,336 KB
testcase_13 AC 91 ms
71,568 KB
testcase_14 AC 92 ms
71,416 KB
testcase_15 AC 93 ms
71,684 KB
testcase_16 AC 91 ms
71,664 KB
testcase_17 AC 91 ms
71,484 KB
testcase_18 AC 90 ms
71,588 KB
testcase_19 AC 92 ms
71,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
import bisect
N, M, X, Y = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
A = deque(A)
while A and A[0]<=Y:
    A.popleft()
pos = bisect.bisect_left(A, X)
if len(A)-pos>M:
    print("Handicapped")
    exit()
while len(A)>M:
    A.popleft()
print(sum(A))
0