結果

問題 No.1736 Princess vs. Dragoness
ユーザー horitaka1999horitaka1999
提出日時 2021-11-12 21:50:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 78,228 KB
最終ジャッジ日時 2023-08-17 01:00:59
合計ジャッジ時間 5,617 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
71,440 KB
testcase_01 AC 78 ms
71,636 KB
testcase_02 AC 80 ms
71,560 KB
testcase_03 AC 89 ms
75,384 KB
testcase_04 AC 105 ms
76,648 KB
testcase_05 AC 83 ms
71,444 KB
testcase_06 AC 113 ms
77,784 KB
testcase_07 AC 114 ms
78,228 KB
testcase_08 AC 108 ms
77,548 KB
testcase_09 AC 118 ms
78,000 KB
testcase_10 AC 78 ms
71,628 KB
testcase_11 AC 121 ms
77,860 KB
testcase_12 AC 104 ms
76,572 KB
testcase_13 AC 110 ms
76,604 KB
testcase_14 AC 108 ms
77,004 KB
testcase_15 AC 96 ms
76,788 KB
testcase_16 AC 109 ms
76,612 KB
testcase_17 AC 112 ms
77,616 KB
testcase_18 AC 106 ms
76,792 KB
testcase_19 AC 102 ms
76,912 KB
testcase_20 AC 91 ms
75,752 KB
testcase_21 AC 118 ms
77,960 KB
testcase_22 AC 119 ms
77,732 KB
testcase_23 AC 107 ms
76,968 KB
testcase_24 AC 84 ms
71,344 KB
testcase_25 AC 114 ms
77,456 KB
testcase_26 AC 118 ms
78,140 KB
testcase_27 AC 103 ms
76,888 KB
testcase_28 AC 99 ms
76,816 KB
testcase_29 AC 99 ms
76,788 KB
testcase_30 AC 104 ms
76,992 KB
testcase_31 AC 119 ms
77,848 KB
testcase_32 AC 118 ms
78,108 KB
testcase_33 AC 80 ms
71,448 KB
testcase_34 AC 82 ms
71,612 KB
testcase_35 AC 82 ms
71,344 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