結果

問題 No.1736 Princess vs. Dragoness
ユーザー HydruHydru
提出日時 2021-11-12 21:36:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 87,308 KB
実行使用メモリ 76,884 KB
最終ジャッジ日時 2023-08-17 00:17:08
合計ジャッジ時間 4,916 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,348 KB
testcase_01 AC 81 ms
71,456 KB
testcase_02 AC 82 ms
71,464 KB
testcase_03 AC 81 ms
71,548 KB
testcase_04 AC 86 ms
76,396 KB
testcase_05 AC 80 ms
71,320 KB
testcase_06 AC 86 ms
75,928 KB
testcase_07 AC 88 ms
76,564 KB
testcase_08 AC 87 ms
76,636 KB
testcase_09 AC 88 ms
76,564 KB
testcase_10 AC 81 ms
71,396 KB
testcase_11 AC 88 ms
76,736 KB
testcase_12 AC 88 ms
76,724 KB
testcase_13 AC 87 ms
75,924 KB
testcase_14 AC 87 ms
76,532 KB
testcase_15 AC 86 ms
75,920 KB
testcase_16 AC 79 ms
71,316 KB
testcase_17 AC 88 ms
76,880 KB
testcase_18 AC 86 ms
75,788 KB
testcase_19 AC 88 ms
76,536 KB
testcase_20 AC 82 ms
71,456 KB
testcase_21 AC 89 ms
76,884 KB
testcase_22 AC 88 ms
76,852 KB
testcase_23 AC 86 ms
75,896 KB
testcase_24 AC 82 ms
71,408 KB
testcase_25 AC 81 ms
71,424 KB
testcase_26 AC 86 ms
75,888 KB
testcase_27 AC 85 ms
75,932 KB
testcase_28 AC 84 ms
76,012 KB
testcase_29 AC 83 ms
75,932 KB
testcase_30 AC 85 ms
75,984 KB
testcase_31 AC 82 ms
71,424 KB
testcase_32 AC 85 ms
75,920 KB
testcase_33 AC 80 ms
71,516 KB
testcase_34 AC 81 ms
71,440 KB
testcase_35 AC 80 ms
71,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,A,B,X,Y=map(int,input().split())
H=list(map(int,input().split()))
for i in range(N):
    if H[i]>=X:
        if A>H[i]//X:
            A-=H[i]//X
            H[i]%=X
        else:
            H[i]-=A*X
            A=0
            break
if A>0:
    H.sort(reverse=True)
    for i in range(min(N,A)):
        H[i]=0
if sum(H)<=B*Y:
    print("Yes")
else:
    print("No")
0