結果

問題 No.1736 Princess vs. Dragoness
ユーザー a aa a
提出日時 2022-10-07 16:01:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 435 bytes
コンパイル時間 883 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 8,748 KB
最終ジャッジ日時 2023-09-02 16:24:20
合計ジャッジ時間 7,139 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,968 KB
testcase_01 WA -
testcase_02 AC 16 ms
7,888 KB
testcase_03 AC 30 ms
8,004 KB
testcase_04 AC 67 ms
7,924 KB
testcase_05 AC 19 ms
8,032 KB
testcase_06 AC 217 ms
8,496 KB
testcase_07 AC 225 ms
8,488 KB
testcase_08 AC 84 ms
8,056 KB
testcase_09 AC 156 ms
8,552 KB
testcase_10 AC 16 ms
7,888 KB
testcase_11 WA -
testcase_12 AC 143 ms
7,840 KB
testcase_13 AC 315 ms
8,504 KB
testcase_14 AC 354 ms
8,620 KB
testcase_15 AC 68 ms
7,920 KB
testcase_16 AC 113 ms
8,024 KB
testcase_17 AC 269 ms
8,436 KB
testcase_18 AC 349 ms
8,476 KB
testcase_19 AC 369 ms
8,400 KB
testcase_20 AC 63 ms
7,912 KB
testcase_21 AC 96 ms
8,416 KB
testcase_22 AC 145 ms
8,528 KB
testcase_23 AC 59 ms
8,472 KB
testcase_24 AC 28 ms
7,912 KB
testcase_25 AC 51 ms
7,880 KB
testcase_26 AC 113 ms
8,508 KB
testcase_27 AC 81 ms
8,644 KB
testcase_28 AC 60 ms
8,476 KB
testcase_29 AC 56 ms
8,556 KB
testcase_30 AC 180 ms
8,536 KB
testcase_31 AC 84 ms
7,920 KB
testcase_32 AC 150 ms
8,468 KB
testcase_33 WA -
testcase_34 AC 16 ms
8,004 KB
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n,a,b,x,y=list(map(int,input().split()))
h=list(map(int,input().split ()))
for k in range(a):
    mi=h.index(max(h))
    h[mi]-=x
for i in range(b):
    p=y
    for j in range(n):
        if h[j]>0:
            d=min(p,h[j])
            p-=d
            h[j]-=d
            if p==0<h[j]:
                break
    if i==b-1 and h[-1]>0:
        print("No")
        break
    if max(h)<=0:
        print("Yes")
        break
0