結果

問題 No.1736 Princess vs. Dragoness
ユーザー customfolkcustomfolk
提出日時 2021-11-12 21:36:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 1,126 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 67,872 KB
最終ジャッジ日時 2024-05-04 07:39:00
合計ジャッジ時間 3,292 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
62,304 KB
testcase_01 AC 51 ms
62,276 KB
testcase_02 AC 50 ms
62,936 KB
testcase_03 AC 51 ms
62,188 KB
testcase_04 AC 56 ms
66,140 KB
testcase_05 AC 50 ms
62,164 KB
testcase_06 AC 57 ms
67,276 KB
testcase_07 AC 60 ms
67,792 KB
testcase_08 AC 58 ms
66,800 KB
testcase_09 AC 60 ms
66,888 KB
testcase_10 AC 52 ms
62,372 KB
testcase_11 AC 60 ms
67,864 KB
testcase_12 AC 57 ms
66,268 KB
testcase_13 AC 57 ms
66,088 KB
testcase_14 AC 57 ms
65,852 KB
testcase_15 AC 56 ms
65,904 KB
testcase_16 AC 52 ms
62,156 KB
testcase_17 AC 57 ms
66,956 KB
testcase_18 AC 60 ms
67,872 KB
testcase_19 AC 59 ms
66,064 KB
testcase_20 AC 51 ms
62,200 KB
testcase_21 AC 56 ms
65,540 KB
testcase_22 AC 58 ms
66,932 KB
testcase_23 AC 57 ms
65,752 KB
testcase_24 AC 51 ms
62,340 KB
testcase_25 AC 51 ms
62,888 KB
testcase_26 AC 60 ms
66,292 KB
testcase_27 AC 57 ms
67,364 KB
testcase_28 AC 58 ms
65,724 KB
testcase_29 AC 57 ms
66,780 KB
testcase_30 AC 58 ms
67,144 KB
testcase_31 AC 51 ms
63,320 KB
testcase_32 AC 57 ms
66,616 KB
testcase_33 AC 51 ms
62,024 KB
testcase_34 AC 51 ms
61,044 KB
testcase_35 AC 49 ms
62,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict, deque, Counter
from heapq import heapify, heappop, heappush
import math
from copy import deepcopy
from itertools import combinations, permutations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right

import sys

def input():
    return sys.stdin.readline().rstrip()
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getListGraph():
    return list(map(lambda x:int(x) - 1, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]

mod = 10 ** 9 + 7
MOD = 998244353
sys.setrecursionlimit(10000000)
inf = float('inf')
eps = 10 ** (-15)
dy = [0, 1, 0, -1]
dx = [1, 0, -1, 0]

#############
# Main Code #
#############

# まずAで減らす
N, A, B, X, Y = getNM()
H = getList()

for i in range(N):
    t = min(H[i] // X, A)
    H[i] -= X * t
    A -= t

H.sort()
for i in range(N - 1, -1, -1):
    if A:
        H[i] -= X
        A -= 1
H = [h if h >= 0 else 0 for h in H]

if B * Y >= sum(H):
    print('Yes')
else:
    print('No')
0