結果

問題 No.1736 Princess vs. Dragoness
ユーザー ShirotsumeShirotsume
提出日時 2021-10-13 00:18:32
言語 PyPy3
(7.3.13)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 426 bytes
コンパイル時間 249 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 77,244 KB
最終ジャッジ日時 2023-08-16 20:40:19
合計ジャッジ時間 5,401 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,444 KB
testcase_01 AC 61 ms
71,576 KB
testcase_02 AC 62 ms
71,532 KB
testcase_03 WA -
testcase_04 AC 78 ms
76,696 KB
testcase_05 AC 73 ms
76,368 KB
testcase_06 AC 108 ms
77,100 KB
testcase_07 AC 99 ms
76,368 KB
testcase_08 AC 83 ms
76,348 KB
testcase_09 AC 91 ms
76,428 KB
testcase_10 AC 69 ms
76,160 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 107 ms
77,132 KB
testcase_14 WA -
testcase_15 AC 80 ms
77,084 KB
testcase_16 AC 84 ms
76,936 KB
testcase_17 WA -
testcase_18 AC 114 ms
76,804 KB
testcase_19 AC 115 ms
77,008 KB
testcase_20 AC 78 ms
76,820 KB
testcase_21 WA -
testcase_22 AC 94 ms
76,272 KB
testcase_23 AC 78 ms
76,924 KB
testcase_24 AC 72 ms
76,260 KB
testcase_25 AC 71 ms
76,248 KB
testcase_26 AC 83 ms
76,896 KB
testcase_27 AC 76 ms
76,556 KB
testcase_28 AC 78 ms
77,144 KB
testcase_29 AC 78 ms
76,932 KB
testcase_30 AC 98 ms
77,068 KB
testcase_31 AC 78 ms
76,696 KB
testcase_32 AC 86 ms
77,096 KB
testcase_33 AC 64 ms
71,416 KB
testcase_34 WA -
testcase_35 AC 63 ms
71,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solveac(n, a, b, x, y, h):
    for i in range(a):
        target = h.index(max(h))
        h[target] -= x
    for i in range(b):
        p = y
        for j in range(n):
            d = min(h[j], p)
            p -= d
            h[j] -= d
    if max(h) <= 0:
        return 'Yes'
    else:
        return 'No'

n, a, b, x, y = map(int,input().split())
h = list(map(int,input().split()))
print(solveac(n, a, b, x, y, h))

0