結果

問題 No.1736 Princess vs. Dragoness
ユーザー hir355hir355
提出日時 2021-11-12 21:54:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 425 bytes
コンパイル時間 722 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 78,228 KB
最終ジャッジ日時 2023-08-17 01:10:22
合計ジャッジ時間 5,084 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,444 KB
testcase_01 AC 76 ms
71,348 KB
testcase_02 AC 76 ms
71,136 KB
testcase_03 AC 83 ms
75,832 KB
testcase_04 AC 96 ms
76,888 KB
testcase_05 AC 88 ms
75,872 KB
testcase_06 AC 96 ms
76,736 KB
testcase_07 AC 114 ms
78,024 KB
testcase_08 AC 103 ms
77,580 KB
testcase_09 AC 111 ms
78,228 KB
testcase_10 AC 84 ms
75,900 KB
testcase_11 AC 116 ms
77,864 KB
testcase_12 AC 93 ms
76,500 KB
testcase_13 AC 99 ms
76,916 KB
testcase_14 AC 105 ms
77,932 KB
testcase_15 AC 89 ms
76,420 KB
testcase_16 AC 94 ms
76,136 KB
testcase_17 AC 101 ms
77,644 KB
testcase_18 AC 91 ms
76,856 KB
testcase_19 AC 90 ms
76,796 KB
testcase_20 AC 82 ms
75,576 KB
testcase_21 AC 104 ms
77,716 KB
testcase_22 AC 108 ms
77,968 KB
testcase_23 AC 99 ms
77,420 KB
testcase_24 AC 75 ms
71,224 KB
testcase_25 AC 104 ms
77,416 KB
testcase_26 AC 101 ms
77,464 KB
testcase_27 AC 104 ms
77,444 KB
testcase_28 AC 91 ms
76,808 KB
testcase_29 AC 86 ms
76,396 KB
testcase_30 AC 93 ms
76,788 KB
testcase_31 AC 106 ms
77,252 KB
testcase_32 AC 108 ms
77,720 KB
testcase_33 AC 75 ms
71,088 KB
testcase_34 AC 73 ms
71,560 KB
testcase_35 AC 74 ms
71,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import heapify, heappush, heappop
n, a, b, x, y = map(int, input().split())
h = list(map(lambda x:-int(x), input().split()))
heapify(h)
for i in range(a):
    xx = -heappop(h)
    xx -= x
    heappush(h, -xx)
h = list(map(lambda x:-x, h))
t = b * y
for i in range(n):
    d = max(0, min(h[i], t))
    h[i] -= d
    t -= d
for i in range(n):
    if h[i] > 0:
        print('No')
        break
else:
    print('Yes')
0