結果

問題 No.1736 Princess vs. Dragoness
ユーザー MasKoaTSMasKoaTS
提出日時 2021-11-12 21:34:29
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 264 ms / 2,000 ms
コード長 895 bytes
コンパイル時間 371 ms
コンパイル使用メモリ 87,324 KB
実行使用メモリ 85,716 KB
最終ジャッジ日時 2023-08-17 00:11:45
合計ジャッジ時間 10,654 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 213 ms
83,156 KB
testcase_01 AC 210 ms
83,136 KB
testcase_02 AC 208 ms
82,856 KB
testcase_03 AC 220 ms
83,456 KB
testcase_04 AC 235 ms
84,536 KB
testcase_05 AC 224 ms
83,720 KB
testcase_06 AC 251 ms
85,436 KB
testcase_07 AC 261 ms
85,480 KB
testcase_08 AC 247 ms
85,620 KB
testcase_09 AC 257 ms
85,580 KB
testcase_10 AC 219 ms
83,480 KB
testcase_11 AC 264 ms
85,244 KB
testcase_12 AC 241 ms
85,140 KB
testcase_13 AC 248 ms
85,372 KB
testcase_14 AC 251 ms
85,180 KB
testcase_15 AC 229 ms
84,480 KB
testcase_16 AC 231 ms
84,088 KB
testcase_17 AC 251 ms
85,688 KB
testcase_18 AC 249 ms
85,276 KB
testcase_19 AC 238 ms
84,332 KB
testcase_20 AC 225 ms
83,720 KB
testcase_21 AC 254 ms
85,452 KB
testcase_22 AC 262 ms
85,256 KB
testcase_23 AC 244 ms
85,272 KB
testcase_24 AC 212 ms
83,512 KB
testcase_25 AC 241 ms
84,824 KB
testcase_26 AC 255 ms
85,408 KB
testcase_27 AC 256 ms
85,716 KB
testcase_28 AC 246 ms
84,928 KB
testcase_29 AC 249 ms
84,900 KB
testcase_30 AC 257 ms
85,176 KB
testcase_31 AC 250 ms
84,960 KB
testcase_32 AC 255 ms
85,280 KB
testcase_33 AC 235 ms
83,148 KB
testcase_34 AC 215 ms
83,076 KB
testcase_35 AC 214 ms
82,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools as iter
import collections as coll
import heapq as hq
import bisect as bis
from decimal import Decimal as dec
from copy import deepcopy as dcopy
import math
import sys
sys.setrecursionlimit(10**6)
def input():
    return sys.stdin.readline().rstrip()
def getN():
	return int(sys.stdin.readline())
def getNs():
	return map(int,sys.stdin.readline().split())
def getList():
	return list(map(int,sys.stdin.readline().split()))
def strinps(n):
	return [sys.stdin.readline().rstrip() for _ in range(n)]
pi = 3.141592653589793
mod = 10**9+7
MOD = 998244353
INF = math.inf
dx = [1,0,-1,0];	dy = [0,1,0,-1]


"""
Main Code
"""

n,a,b,x,y = getNs()
h = getList()

hque = []
for i in h:
	hq.heappush(hque,-i)
for _ in [0]*a:
	hp = hq.heappop(hque)
	hq.heappush(hque,hp+x)
s = 0
while(hque):
	hp = -hq.heappop(hque)
	#print(hp)
	s += max(0,hp)
if(s <= y*b):
	print("Yes")
else:
	print("No")
0