結果

問題 No.1736 Princess vs. Dragoness
ユーザー moharan627moharan627
提出日時 2021-11-12 21:47:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,039 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 82,240 KB
実行使用メモリ 76,544 KB
最終ジャッジ日時 2024-05-04 08:10:45
合計ジャッジ時間 3,719 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
53,888 KB
testcase_01 AC 45 ms
53,632 KB
testcase_02 AC 46 ms
53,504 KB
testcase_03 WA -
testcase_04 AC 73 ms
71,680 KB
testcase_05 AC 54 ms
62,976 KB
testcase_06 AC 108 ms
76,544 KB
testcase_07 WA -
testcase_08 AC 90 ms
75,648 KB
testcase_09 WA -
testcase_10 AC 53 ms
62,208 KB
testcase_11 AC 92 ms
66,048 KB
testcase_12 WA -
testcase_13 AC 99 ms
76,032 KB
testcase_14 WA -
testcase_15 AC 76 ms
75,904 KB
testcase_16 AC 70 ms
75,648 KB
testcase_17 WA -
testcase_18 AC 124 ms
76,288 KB
testcase_19 AC 113 ms
75,648 KB
testcase_20 AC 78 ms
76,160 KB
testcase_21 AC 62 ms
67,968 KB
testcase_22 WA -
testcase_23 AC 64 ms
76,040 KB
testcase_24 AC 59 ms
70,016 KB
testcase_25 AC 58 ms
63,872 KB
testcase_26 AC 80 ms
76,288 KB
testcase_27 AC 63 ms
68,736 KB
testcase_28 AC 72 ms
76,032 KB
testcase_29 AC 77 ms
76,160 KB
testcase_30 AC 85 ms
76,288 KB
testcase_31 WA -
testcase_32 AC 83 ms
75,904 KB
testcase_33 AC 39 ms
53,504 KB
testcase_34 WA -
testcase_35 AC 39 ms
53,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#sys.setrecursionlimit(10 ** 6)
INF = float('inf')
#10**20,2**63に変えるのもあり
MOD = 10**9 + 7
MOD2 = 998244353
from collections import defaultdict
def solve():
    def II(): return int(sys.stdin.readline())
    def LI(): return list(map(int, sys.stdin.readline().split()))
    def LC(): return list(input())
    def IC(): return [int(c) for c in input()]
    def MI(): return map(int, sys.stdin.readline().split())
    N,A,B,X,Y = MI()
    H =LI()
    for a in range(A):
        MAX=0
        idx = -1
        for n in range(N):
            if H[n]<=0:
                continue
            if MAX < H[n]:
                MAX = H[n]
                idx = n
        H[idx]-=X
    for b in range(B):
        P = Y
        for i in range(N):
            if H[n]<=0:
                continue
            D = min(P,H[i])
            H[i]-=D
            P-=D
    flag = True
    for n in range(N):
        if H[n]>0:
            flag = False
    if flag:
        print("Yes")
    else:
        print("No")
    return
solve()
0