結果

問題 No.1736 Princess vs. Dragoness
ユーザー mahiro72mahiro72
提出日時 2021-11-12 21:44:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 82,580 KB
実行使用メモリ 73,216 KB
最終ジャッジ日時 2024-05-04 07:58:24
合計ジャッジ時間 3,463 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
52,352 KB
testcase_01 AC 44 ms
52,224 KB
testcase_02 AC 41 ms
52,224 KB
testcase_03 AC 57 ms
61,824 KB
testcase_04 WA -
testcase_05 AC 60 ms
62,976 KB
testcase_06 AC 71 ms
67,456 KB
testcase_07 WA -
testcase_08 AC 74 ms
70,144 KB
testcase_09 AC 70 ms
68,480 KB
testcase_10 AC 58 ms
62,208 KB
testcase_11 AC 76 ms
73,088 KB
testcase_12 AC 61 ms
64,896 KB
testcase_13 WA -
testcase_14 AC 66 ms
65,152 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 68 ms
67,584 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 70 ms
68,480 KB
testcase_22 AC 75 ms
71,296 KB
testcase_23 AC 57 ms
62,336 KB
testcase_24 AC 43 ms
52,224 KB
testcase_25 WA -
testcase_26 AC 76 ms
70,656 KB
testcase_27 AC 68 ms
67,072 KB
testcase_28 AC 57 ms
62,464 KB
testcase_29 AC 50 ms
59,520 KB
testcase_30 AC 65 ms
65,152 KB
testcase_31 WA -
testcase_32 AC 73 ms
69,248 KB
testcase_33 AC 43 ms
52,352 KB
testcase_34 AC 43 ms
52,480 KB
testcase_35 AC 42 ms
52,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq

N,A,B,X,Y = map(int,input().split())
H = list(map(int,input().split()))

a = 0
H.sort(reverse=True)
hq = H.copy()

while a<A:
    h = heapq.heappop(hq)
    h-=X
    heapq.heappush(hq,h)
    a+=1

hq = list(map(lambda x:0 if x<=0 else x,list(hq)))
print('Yes'if sum(hq)<=B*Y else 'No')

0