結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,924 KB
testcase_01 AC 16 ms
7,916 KB
testcase_02 AC 15 ms
7,812 KB
testcase_03 AC 43 ms
7,820 KB
testcase_04 AC 68 ms
7,924 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1,308 ms
8,492 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 427 ms
8,680 KB
testcase_12 AC 349 ms
7,992 KB
testcase_13 WA -
testcase_14 AC 1,213 ms
8,552 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 768 ms
8,524 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 291 ms
8,024 KB
testcase_21 AC 26 ms
8,384 KB
testcase_22 TLE -
testcase_23 AC 763 ms
8,536 KB
testcase_24 WA -
testcase_25 AC 30 ms
7,912 KB
testcase_26 AC 674 ms
8,368 KB
testcase_27 AC 80 ms
8,688 KB
testcase_28 AC 237 ms
8,460 KB
testcase_29 AC 324 ms
8,532 KB
testcase_30 AC 1,110 ms
8,360 KB
testcase_31 AC 82 ms
7,992 KB
testcase_32 AC 263 ms
7,852 KB
testcase_33 AC 16 ms
8,000 KB
testcase_34 AC 16 ms
7,836 KB
testcase_35 AC 16 ms
8,008 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 a<0:
           print("No")
           break
       elif k==n-1 and a>=0:
           print("Yes")
0