結果

問題 No.1736 Princess vs. Dragoness
ユーザー ShirotsumeShirotsume
提出日時 2021-10-13 05:44:38
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 417 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 82,228 KB
実行使用メモリ 76,724 KB
最終ジャッジ日時 2024-05-04 04:06:10
合計ジャッジ時間 3,565 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,160 KB
testcase_01 AC 37 ms
52,576 KB
testcase_02 AC 37 ms
52,984 KB
testcase_03 WA -
testcase_04 AC 54 ms
67,164 KB
testcase_05 AC 47 ms
61,480 KB
testcase_06 AC 59 ms
67,992 KB
testcase_07 AC 78 ms
76,724 KB
testcase_08 AC 60 ms
69,840 KB
testcase_09 AC 68 ms
74,628 KB
testcase_10 AC 46 ms
61,292 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 58 ms
68,892 KB
testcase_14 WA -
testcase_15 AC 47 ms
62,760 KB
testcase_16 AC 61 ms
65,852 KB
testcase_17 WA -
testcase_18 AC 54 ms
64,344 KB
testcase_19 AC 54 ms
65,668 KB
testcase_20 AC 46 ms
60,068 KB
testcase_21 WA -
testcase_22 AC 68 ms
72,288 KB
testcase_23 AC 60 ms
68,568 KB
testcase_24 AC 37 ms
54,308 KB
testcase_25 AC 60 ms
70,212 KB
testcase_26 AC 64 ms
71,884 KB
testcase_27 AC 63 ms
70,376 KB
testcase_28 AC 53 ms
65,740 KB
testcase_29 AC 49 ms
63,304 KB
testcase_30 AC 54 ms
66,788 KB
testcase_31 AC 69 ms
73,208 KB
testcase_32 AC 66 ms
74,020 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 36 ms
53,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve2(n, a, b, x, y, h):
    import heapq
    hm = [-x for x in h]
    heapq.heapify(hm)
    for i in range(a):
        target = heapq.heappop(hm)
        target += x
        heapq.heappush(hm, target)
    h = [-x for x in hm]
    if sum(h) <= b * y:
        return 'Yes'
    else:
        return 'No'


n, a, b, x, y = map(int,input().split())
h = list(map(int,input().split()))
print(solve2(n, a, b, x, y, h))
0