結果

問題 No.1736 Princess vs. Dragoness
ユーザー a aa a
提出日時 2022-10-07 15:30:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 399 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,948 KB
実行使用メモリ 8,672 KB
最終ジャッジ日時 2023-09-02 15:53:55
合計ジャッジ時間 22,428 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 16 ms
7,936 KB
testcase_03 AC 46 ms
8,016 KB
testcase_04 WA -
testcase_05 AC 68 ms
8,012 KB
testcase_06 AC 1,391 ms
8,556 KB
testcase_07 WA -
testcase_08 AC 1,159 ms
7,936 KB
testcase_09 AC 1,558 ms
8,452 KB
testcase_10 AC 24 ms
7,912 KB
testcase_11 AC 418 ms
8,556 KB
testcase_12 AC 328 ms
7,968 KB
testcase_13 WA -
testcase_14 AC 1,216 ms
8,560 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 794 ms
8,408 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 25 ms
8,540 KB
testcase_22 TLE -
testcase_23 AC 764 ms
8,436 KB
testcase_24 AC 180 ms
7,996 KB
testcase_25 WA -
testcase_26 AC 711 ms
8,400 KB
testcase_27 AC 83 ms
8,584 KB
testcase_28 AC 247 ms
8,556 KB
testcase_29 AC 318 ms
8,560 KB
testcase_30 AC 1,090 ms
8,536 KB
testcase_31 WA -
testcase_32 AC 270 ms
8,600 KB
testcase_33 AC 16 ms
8,052 KB
testcase_34 AC 16 ms
7,912 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 ()))
h.sort()
for i in range (b):
    p=y
    for j in range(n):
        d=min(p,h[j])
        h[j]-=d
        p-=d
        if p==0:
            break
for k in range(n):
    if h[k]>0:
       a-=math.ceil(h[k]/x)
    elif k==n-1 and a>=0:
           print("Yes")
    if a<0:
        print("No")
        break
        
0