結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,984 KB
testcase_01 AC 16 ms
7,852 KB
testcase_02 AC 16 ms
7,916 KB
testcase_03 AC 46 ms
7,920 KB
testcase_04 AC 68 ms
7,956 KB
testcase_05 AC 65 ms
7,944 KB
testcase_06 AC 1,332 ms
8,500 KB
testcase_07 AC 1,284 ms
8,512 KB
testcase_08 AC 1,110 ms
7,912 KB
testcase_09 AC 1,522 ms
8,436 KB
testcase_10 AC 24 ms
8,044 KB
testcase_11 AC 409 ms
8,688 KB
testcase_12 AC 329 ms
8,056 KB
testcase_13 WA -
testcase_14 AC 1,232 ms
8,396 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 778 ms
8,440 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 292 ms
7,876 KB
testcase_21 AC 25 ms
8,512 KB
testcase_22 TLE -
testcase_23 AC 774 ms
8,608 KB
testcase_24 AC 182 ms
7,952 KB
testcase_25 AC 30 ms
7,900 KB
testcase_26 AC 701 ms
8,608 KB
testcase_27 AC 80 ms
8,672 KB
testcase_28 AC 246 ms
8,524 KB
testcase_29 AC 312 ms
8,432 KB
testcase_30 AC 1,130 ms
8,372 KB
testcase_31 AC 81 ms
8,044 KB
testcase_32 AC 248 ms
8,568 KB
testcase_33 AC 15 ms
8,048 KB
testcase_34 AC 16 ms
8,084 KB
testcase_35 AC 16 ms
8,028 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)
    if k==n-1 and a>=0:
           print("Yes")
    if a<0:
        print("No")
        break
        
0