結果

問題 No.1736 Princess vs. Dragoness
ユーザー horitaka1999horitaka1999
提出日時 2021-11-12 22:18:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 78,140 KB
最終ジャッジ日時 2023-08-17 02:03:08
合計ジャッジ時間 5,622 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,384 KB
testcase_01 AC 81 ms
71,232 KB
testcase_02 AC 79 ms
71,096 KB
testcase_03 AC 85 ms
75,524 KB
testcase_04 AC 106 ms
76,792 KB
testcase_05 AC 78 ms
71,340 KB
testcase_06 AC 110 ms
77,656 KB
testcase_07 AC 113 ms
77,908 KB
testcase_08 AC 108 ms
77,460 KB
testcase_09 AC 112 ms
78,140 KB
testcase_10 AC 80 ms
71,560 KB
testcase_11 AC 119 ms
77,784 KB
testcase_12 AC 96 ms
76,684 KB
testcase_13 AC 102 ms
76,636 KB
testcase_14 AC 101 ms
76,828 KB
testcase_15 AC 90 ms
76,468 KB
testcase_16 AC 100 ms
76,620 KB
testcase_17 AC 108 ms
77,680 KB
testcase_18 AC 98 ms
76,856 KB
testcase_19 AC 97 ms
76,740 KB
testcase_20 AC 85 ms
75,624 KB
testcase_21 AC 111 ms
77,884 KB
testcase_22 AC 111 ms
77,568 KB
testcase_23 AC 98 ms
76,468 KB
testcase_24 AC 79 ms
71,316 KB
testcase_25 AC 107 ms
76,972 KB
testcase_26 AC 111 ms
78,132 KB
testcase_27 AC 102 ms
76,712 KB
testcase_28 AC 95 ms
76,812 KB
testcase_29 AC 92 ms
76,580 KB
testcase_30 AC 102 ms
76,824 KB
testcase_31 AC 116 ms
77,740 KB
testcase_32 AC 116 ms
78,012 KB
testcase_33 AC 80 ms
71,208 KB
testcase_34 AC 78 ms
71,688 KB
testcase_35 AC 80 ms
71,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import heappop,heappush
N,A,B,X,Y = map(int,input().split())
H = list(map(int,input().split()))
q = []
for h in H:
    heappush(q,-h)
while A and q:
    h = heappop(q)
    h *= -1
    if h > X:
        heappush(q,-(h-X))
    A -=1
SUMS = 0
for h in q:
    SUMS += -h
if SUMS <= Y * B:
    print('Yes')
else:
    print('No')

    
0