結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー nohakai3nohakai3
提出日時 2022-07-05 18:37:31
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 19,632 KB
最終ジャッジ日時 2023-08-22 07:54:06
合計ジャッジ時間 2,314 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,972 KB
testcase_01 AC 15 ms
7,920 KB
testcase_02 AC 15 ms
8,032 KB
testcase_03 AC 15 ms
7,928 KB
testcase_04 AC 47 ms
19,632 KB
testcase_05 AC 15 ms
8,028 KB
testcase_06 AC 15 ms
7,928 KB
testcase_07 AC 42 ms
18,552 KB
testcase_08 AC 41 ms
18,536 KB
testcase_09 AC 41 ms
18,476 KB
testcase_10 AC 15 ms
8,060 KB
testcase_11 AC 15 ms
7,920 KB
testcase_12 AC 15 ms
8,024 KB
testcase_13 AC 15 ms
7,960 KB
testcase_14 AC 15 ms
7,972 KB
testcase_15 AC 15 ms
8,088 KB
testcase_16 AC 16 ms
7,968 KB
testcase_17 AC 15 ms
8,076 KB
testcase_18 AC 14 ms
7,968 KB
testcase_19 AC 15 ms
7,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

N,M,X,Y = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
y=bisect.bisect_right(A,Y)
x=bisect.bisect_left(A,X)

if N-x>M:
    print("Handicapped")

else:
    l=max(bisect.bisect_left(A,0),N-M,y)
    print(sum(A[l:]))
0