結果

問題 No.1736 Princess vs. Dragoness
ユーザー sanao10000sanao10000
提出日時 2021-11-12 22:50:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 82,244 KB
実行使用メモリ 67,072 KB
最終ジャッジ日時 2024-05-04 10:25:11
合計ジャッジ時間 3,893 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,840 KB
testcase_01 AC 39 ms
52,096 KB
testcase_02 AC 44 ms
51,712 KB
testcase_03 AC 55 ms
62,080 KB
testcase_04 AC 61 ms
63,232 KB
testcase_05 AC 50 ms
60,288 KB
testcase_06 AC 87 ms
64,256 KB
testcase_07 AC 89 ms
65,280 KB
testcase_08 AC 70 ms
64,512 KB
testcase_09 AC 73 ms
64,384 KB
testcase_10 AC 51 ms
60,672 KB
testcase_11 AC 114 ms
67,072 KB
testcase_12 AC 74 ms
63,488 KB
testcase_13 AC 85 ms
63,872 KB
testcase_14 AC 86 ms
64,000 KB
testcase_15 AC 62 ms
62,720 KB
testcase_16 AC 66 ms
63,744 KB
testcase_17 AC 83 ms
64,384 KB
testcase_18 AC 83 ms
63,232 KB
testcase_19 AC 84 ms
63,104 KB
testcase_20 AC 59 ms
61,696 KB
testcase_21 AC 65 ms
64,000 KB
testcase_22 AC 100 ms
65,408 KB
testcase_23 AC 63 ms
62,336 KB
testcase_24 AC 54 ms
60,544 KB
testcase_25 AC 54 ms
61,312 KB
testcase_26 AC 72 ms
64,128 KB
testcase_27 AC 61 ms
62,848 KB
testcase_28 AC 65 ms
63,232 KB
testcase_29 AC 61 ms
62,592 KB
testcase_30 AC 83 ms
63,744 KB
testcase_31 AC 65 ms
64,768 KB
testcase_32 AC 70 ms
64,768 KB
testcase_33 AC 40 ms
51,456 KB
testcase_34 AC 40 ms
51,840 KB
testcase_35 AC 41 ms
52,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, a, b,x,y = map(int, input().split())

hs =list(map(int, input().split()))

for i in range(a):
    maxi1=max(hs)
    maxin=hs.index(maxi1)
    hs[maxin]-=x




for b in range(b):
    p=y
    for i in range(len(hs)):
        if(hs[i]<=0):continue
        D=min(p,hs[i])
        hs[i]-=D
        p-=D

ll=len(list((filter(lambda x: x>0, hs))))
if ll==0:
    print("Yes")
else:
    print("No")
0