結果

問題 No.1736 Princess vs. Dragoness
ユーザー 👑 KazunKazun
提出日時 2021-11-12 21:38:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 606 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 78,016 KB
最終ジャッジ日時 2023-08-17 00:23:15
合計ジャッジ時間 5,662 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
71,540 KB
testcase_01 AC 77 ms
71,408 KB
testcase_02 AC 79 ms
71,372 KB
testcase_03 AC 91 ms
75,328 KB
testcase_04 AC 94 ms
76,592 KB
testcase_05 AC 83 ms
71,292 KB
testcase_06 AC 92 ms
76,768 KB
testcase_07 AC 110 ms
78,016 KB
testcase_08 AC 96 ms
76,832 KB
testcase_09 AC 104 ms
77,504 KB
testcase_10 AC 75 ms
71,520 KB
testcase_11 AC 111 ms
77,936 KB
testcase_12 AC 86 ms
76,572 KB
testcase_13 AC 94 ms
76,828 KB
testcase_14 AC 91 ms
76,900 KB
testcase_15 AC 82 ms
76,368 KB
testcase_16 AC 92 ms
76,496 KB
testcase_17 AC 93 ms
76,688 KB
testcase_18 AC 87 ms
76,544 KB
testcase_19 AC 88 ms
76,328 KB
testcase_20 AC 80 ms
75,644 KB
testcase_21 AC 95 ms
76,848 KB
testcase_22 AC 102 ms
77,556 KB
testcase_23 AC 95 ms
76,752 KB
testcase_24 AC 73 ms
71,328 KB
testcase_25 AC 95 ms
76,764 KB
testcase_26 AC 114 ms
77,432 KB
testcase_27 AC 105 ms
77,388 KB
testcase_28 AC 88 ms
76,456 KB
testcase_29 AC 83 ms
76,160 KB
testcase_30 AC 91 ms
76,420 KB
testcase_31 AC 106 ms
77,524 KB
testcase_32 AC 106 ms
77,912 KB
testcase_33 AC 75 ms
71,592 KB
testcase_34 AC 75 ms
71,464 KB
testcase_35 AC 75 ms
71,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import heapify,heappop,heappush

N,A,B,X,Y=map(int,input().split())
H=list(map(int,input().split()))

H=[-hp for hp in H]
heapify(H)

for _ in range(A):
    if not H:
        continue

    hp=-heappop(H)
    if hp>=X:
        heappush(H,-(hp-X))

print("Yes" if -sum(H)<=B*Y else "No")
0