結果

問題 No.1736 Princess vs. Dragoness
ユーザー a aa a
提出日時 2022-10-07 16:06:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 431 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 8,628 KB
最終ジャッジ日時 2023-09-02 16:29:45
合計ジャッジ時間 6,493 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,960 KB
testcase_01 WA -
testcase_02 AC 17 ms
8,012 KB
testcase_03 AC 31 ms
7,980 KB
testcase_04 AC 69 ms
7,912 KB
testcase_05 AC 19 ms
7,916 KB
testcase_06 AC 221 ms
7,976 KB
testcase_07 AC 231 ms
8,456 KB
testcase_08 AC 86 ms
7,932 KB
testcase_09 AC 158 ms
8,628 KB
testcase_10 AC 17 ms
7,920 KB
testcase_11 AC 467 ms
8,580 KB
testcase_12 AC 142 ms
7,872 KB
testcase_13 AC 321 ms
8,440 KB
testcase_14 AC 352 ms
8,580 KB
testcase_15 AC 71 ms
7,916 KB
testcase_16 AC 119 ms
8,104 KB
testcase_17 AC 274 ms
8,448 KB
testcase_18 AC 352 ms
8,504 KB
testcase_19 AC 374 ms
8,584 KB
testcase_20 AC 66 ms
7,872 KB
testcase_21 AC 98 ms
8,416 KB
testcase_22 AC 148 ms
8,428 KB
testcase_23 AC 60 ms
8,628 KB
testcase_24 AC 28 ms
7,916 KB
testcase_25 AC 53 ms
7,932 KB
testcase_26 AC 116 ms
8,464 KB
testcase_27 AC 81 ms
8,540 KB
testcase_28 AC 62 ms
8,584 KB
testcase_29 AC 57 ms
8,400 KB
testcase_30 AC 185 ms
8,436 KB
testcase_31 AC 88 ms
7,940 KB
testcase_32 AC 155 ms
8,572 KB
testcase_33 WA -
testcase_34 AC 16 ms
7,904 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:
                break
    if i==b-1 and max(h)>0:
        print("No")
        break
    if max(h)<=0:
        print("Yes")
        break
0