結果

問題 No.1736 Princess vs. Dragoness
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-11-12 21:39:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 440 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 78,268 KB
最終ジャッジ日時 2023-08-17 00:26:51
合計ジャッジ時間 5,801 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,392 KB
testcase_01 AC 80 ms
71,292 KB
testcase_02 AC 80 ms
71,320 KB
testcase_03 AC 91 ms
75,688 KB
testcase_04 AC 106 ms
76,876 KB
testcase_05 AC 83 ms
71,328 KB
testcase_06 AC 115 ms
77,880 KB
testcase_07 AC 121 ms
77,916 KB
testcase_08 AC 114 ms
77,340 KB
testcase_09 AC 132 ms
77,836 KB
testcase_10 AC 93 ms
71,332 KB
testcase_11 AC 138 ms
77,972 KB
testcase_12 AC 108 ms
76,856 KB
testcase_13 AC 114 ms
76,784 KB
testcase_14 AC 106 ms
76,860 KB
testcase_15 AC 97 ms
76,388 KB
testcase_16 AC 106 ms
76,572 KB
testcase_17 AC 111 ms
77,736 KB
testcase_18 AC 101 ms
76,908 KB
testcase_19 AC 100 ms
76,928 KB
testcase_20 AC 87 ms
75,712 KB
testcase_21 AC 115 ms
77,688 KB
testcase_22 AC 117 ms
77,668 KB
testcase_23 AC 102 ms
76,892 KB
testcase_24 AC 87 ms
71,432 KB
testcase_25 AC 121 ms
77,332 KB
testcase_26 AC 120 ms
78,268 KB
testcase_27 AC 110 ms
76,856 KB
testcase_28 AC 102 ms
76,564 KB
testcase_29 AC 103 ms
76,756 KB
testcase_30 AC 108 ms
76,872 KB
testcase_31 AC 119 ms
77,580 KB
testcase_32 AC 124 ms
78,008 KB
testcase_33 AC 87 ms
71,428 KB
testcase_34 AC 83 ms
71,212 KB
testcase_35 AC 82 ms
71,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import heappop,heappush
n,a,b,x,y = map(int,input().split())
H = list(map(int,input().split()))

h = []
for i in H:
    heappush(h,-i)

for i in range(a):
    if h:
        num = -heappop(h)
        num -= x
        if num <= 0:
            continue
        heappush(h,-num)

count = -sum(h)
if count <= b*y:
    print("Yes")
else:
    print("No")
0