結果
問題 | No.1736 Princess vs. Dragoness |
ユーザー | MasKoaTS |
提出日時 | 2021-11-12 21:34:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 158 ms / 2,000 ms |
コード長 | 895 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 82,408 KB |
実行使用メモリ | 90,908 KB |
最終ジャッジ日時 | 2024-05-04 07:34:48 |
合計ジャッジ時間 | 6,287 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 111 ms
86,956 KB |
testcase_01 | AC | 115 ms
86,732 KB |
testcase_02 | AC | 118 ms
86,892 KB |
testcase_03 | AC | 131 ms
89,376 KB |
testcase_04 | AC | 143 ms
89,864 KB |
testcase_05 | AC | 131 ms
89,528 KB |
testcase_06 | AC | 151 ms
90,404 KB |
testcase_07 | AC | 156 ms
90,360 KB |
testcase_08 | AC | 147 ms
89,848 KB |
testcase_09 | AC | 155 ms
90,240 KB |
testcase_10 | AC | 127 ms
89,236 KB |
testcase_11 | AC | 155 ms
90,908 KB |
testcase_12 | AC | 146 ms
89,964 KB |
testcase_13 | AC | 149 ms
90,244 KB |
testcase_14 | AC | 152 ms
90,496 KB |
testcase_15 | AC | 133 ms
89,868 KB |
testcase_16 | AC | 138 ms
89,904 KB |
testcase_17 | AC | 158 ms
90,408 KB |
testcase_18 | AC | 153 ms
89,724 KB |
testcase_19 | AC | 148 ms
89,672 KB |
testcase_20 | AC | 128 ms
89,016 KB |
testcase_21 | AC | 151 ms
90,452 KB |
testcase_22 | AC | 156 ms
90,788 KB |
testcase_23 | AC | 142 ms
90,228 KB |
testcase_24 | AC | 117 ms
88,924 KB |
testcase_25 | AC | 143 ms
90,264 KB |
testcase_26 | AC | 150 ms
90,520 KB |
testcase_27 | AC | 151 ms
90,716 KB |
testcase_28 | AC | 138 ms
89,836 KB |
testcase_29 | AC | 147 ms
89,844 KB |
testcase_30 | AC | 141 ms
90,448 KB |
testcase_31 | AC | 142 ms
90,396 KB |
testcase_32 | AC | 149 ms
90,356 KB |
testcase_33 | AC | 116 ms
87,048 KB |
testcase_34 | AC | 109 ms
86,892 KB |
testcase_35 | AC | 109 ms
86,784 KB |
ソースコード
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")