結果

問題 No.1736 Princess vs. Dragoness
ユーザー dn6049949dn6049949
提出日時 2021-11-14 21:38:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 807 bytes
コンパイル時間 551 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 78,400 KB
最終ジャッジ日時 2023-08-20 06:18:01
合計ジャッジ時間 6,048 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
71,632 KB
testcase_01 AC 94 ms
71,488 KB
testcase_02 AC 94 ms
71,392 KB
testcase_03 AC 121 ms
75,952 KB
testcase_04 AC 138 ms
77,256 KB
testcase_05 AC 97 ms
71,400 KB
testcase_06 AC 147 ms
77,992 KB
testcase_07 AC 130 ms
77,392 KB
testcase_08 AC 125 ms
77,596 KB
testcase_09 AC 130 ms
77,556 KB
testcase_10 AC 95 ms
71,580 KB
testcase_11 AC 130 ms
78,268 KB
testcase_12 AC 115 ms
77,796 KB
testcase_13 AC 123 ms
77,556 KB
testcase_14 AC 119 ms
77,580 KB
testcase_15 AC 108 ms
77,008 KB
testcase_16 AC 120 ms
77,344 KB
testcase_17 AC 124 ms
77,556 KB
testcase_18 AC 119 ms
77,544 KB
testcase_19 AC 118 ms
77,488 KB
testcase_20 AC 105 ms
76,148 KB
testcase_21 AC 126 ms
77,776 KB
testcase_22 AC 127 ms
77,260 KB
testcase_23 AC 115 ms
77,600 KB
testcase_24 AC 95 ms
71,280 KB
testcase_25 AC 119 ms
77,448 KB
testcase_26 AC 125 ms
77,740 KB
testcase_27 AC 122 ms
77,476 KB
testcase_28 AC 114 ms
77,488 KB
testcase_29 AC 112 ms
77,656 KB
testcase_30 AC 119 ms
77,604 KB
testcase_31 AC 128 ms
77,712 KB
testcase_32 AC 130 ms
78,400 KB
testcase_33 AC 95 ms
71,408 KB
testcase_34 AC 97 ms
71,424 KB
testcase_35 AC 96 ms
71,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def IR(n):
    return [I() for _ in range(n)]
def LIR(n):
    return [LI() for _ in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def main():
    n,a,b,x,y = LI()
    h = LI()
    q = []
    for i in h:
        heappush(q,-i)
    for _ in range(a):
        if not q:
            break
        i = heappop(q)
        i += x
        if i < 0:
            heappush(q,i)
    s = -sum(q)
    if s <= b*y:
        print("Yes")
    else:
        print("No")
    return


if __name__ == "__main__":
    main()
0