結果

問題 No.1736 Princess vs. Dragoness
ユーザー a aa a
提出日時 2022-10-07 16:11:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 799 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 10,772 KB
実行使用メモリ 8,736 KB
最終ジャッジ日時 2023-09-02 16:33:38
合計ジャッジ時間 7,340 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,032 KB
testcase_01 AC 15 ms
8,024 KB
testcase_02 AC 16 ms
8,032 KB
testcase_03 AC 26 ms
7,952 KB
testcase_04 AC 81 ms
7,888 KB
testcase_05 AC 28 ms
7,900 KB
testcase_06 AC 271 ms
8,084 KB
testcase_07 AC 799 ms
8,412 KB
testcase_08 AC 292 ms
8,040 KB
testcase_09 AC 481 ms
8,584 KB
testcase_10 AC 18 ms
7,996 KB
testcase_11 AC 320 ms
8,736 KB
testcase_12 AC 106 ms
7,892 KB
testcase_13 AC 254 ms
8,576 KB
testcase_14 AC 257 ms
8,480 KB
testcase_15 AC 58 ms
7,972 KB
testcase_16 AC 94 ms
7,948 KB
testcase_17 AC 209 ms
8,420 KB
testcase_18 AC 263 ms
8,520 KB
testcase_19 AC 281 ms
8,476 KB
testcase_20 AC 55 ms
7,956 KB
testcase_21 AC 94 ms
8,404 KB
testcase_22 AC 654 ms
8,420 KB
testcase_23 AC 28 ms
8,576 KB
testcase_24 AC 27 ms
7,900 KB
testcase_25 AC 61 ms
8,040 KB
testcase_26 AC 86 ms
8,444 KB
testcase_27 AC 75 ms
8,576 KB
testcase_28 AC 35 ms
8,424 KB
testcase_29 AC 27 ms
8,404 KB
testcase_30 AC 80 ms
8,452 KB
testcase_31 AC 94 ms
7,896 KB
testcase_32 AC 129 ms
8,380 KB
testcase_33 AC 16 ms
7,860 KB
testcase_34 AC 16 ms
8,004 KB
testcase_35 AC 16 ms
8,048 KB
権限があれば一括ダウンロードができます

ソースコード

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 max(h)>0:
    print("No")
else:
    print("Yes")
0