結果

問題 No.1736 Princess vs. Dragoness
ユーザー mkawa2mkawa2
提出日時 2021-11-12 21:28:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 919 bytes
コンパイル時間 1,332 ms
コンパイル使用メモリ 86,760 KB
実行使用メモリ 78,004 KB
最終ジャッジ日時 2023-08-16 21:32:14
合計ジャッジ時間 5,763 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,432 KB
testcase_01 AC 76 ms
71,180 KB
testcase_02 AC 76 ms
71,016 KB
testcase_03 AC 84 ms
75,504 KB
testcase_04 AC 98 ms
76,668 KB
testcase_05 AC 77 ms
71,364 KB
testcase_06 AC 108 ms
77,332 KB
testcase_07 AC 110 ms
77,944 KB
testcase_08 AC 103 ms
77,612 KB
testcase_09 AC 108 ms
77,764 KB
testcase_10 AC 75 ms
71,316 KB
testcase_11 AC 113 ms
77,592 KB
testcase_12 AC 94 ms
76,708 KB
testcase_13 AC 100 ms
76,812 KB
testcase_14 AC 98 ms
76,800 KB
testcase_15 AC 85 ms
76,172 KB
testcase_16 AC 97 ms
76,616 KB
testcase_17 AC 101 ms
77,700 KB
testcase_18 AC 95 ms
76,560 KB
testcase_19 AC 93 ms
76,780 KB
testcase_20 AC 82 ms
75,672 KB
testcase_21 AC 107 ms
77,832 KB
testcase_22 AC 107 ms
77,588 KB
testcase_23 AC 93 ms
76,668 KB
testcase_24 AC 75 ms
71,308 KB
testcase_25 AC 101 ms
77,156 KB
testcase_26 AC 104 ms
78,004 KB
testcase_27 AC 97 ms
76,580 KB
testcase_28 AC 92 ms
76,648 KB
testcase_29 AC 90 ms
76,652 KB
testcase_30 AC 97 ms
76,600 KB
testcase_31 AC 109 ms
77,420 KB
testcase_32 AC 110 ms
77,876 KB
testcase_33 AC 75 ms
71,316 KB
testcase_34 AC 75 ms
71,272 KB
testcase_35 AC 75 ms
71,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
# inf = 18446744073709551615
inf = 4294967295
md = 10**9+7
# md = 998244353

from heapq import *

n, a, b, x, y = LI()
hh = LI()

hp = []
for h in hh: heappush(hp, -h)

for _ in range(a):
    if not hp: break
    h = -heappop(hp)
    h -= x
    if h > 0: heappush(hp, -h)

s = -sum(hp)
# print(s,hp)

if s <= y*b: print("Yes")
else: print("No")
0