結果

問題 No.1736 Princess vs. Dragoness
ユーザー titiatitia
提出日時 2021-11-12 21:49:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 8,628 KB
最終ジャッジ日時 2023-08-17 00:57:03
合計ジャッジ時間 3,060 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,032 KB
testcase_01 AC 19 ms
7,972 KB
testcase_02 AC 17 ms
7,940 KB
testcase_03 AC 18 ms
8,096 KB
testcase_04 AC 19 ms
7,940 KB
testcase_05 AC 18 ms
7,968 KB
testcase_06 AC 19 ms
7,940 KB
testcase_07 AC 21 ms
8,400 KB
testcase_08 AC 20 ms
8,024 KB
testcase_09 AC 20 ms
8,560 KB
testcase_10 AC 17 ms
7,940 KB
testcase_11 AC 22 ms
8,388 KB
testcase_12 AC 18 ms
7,976 KB
testcase_13 AC 19 ms
8,524 KB
testcase_14 AC 19 ms
8,368 KB
testcase_15 AC 18 ms
7,968 KB
testcase_16 AC 19 ms
7,972 KB
testcase_17 AC 19 ms
8,460 KB
testcase_18 AC 18 ms
8,536 KB
testcase_19 AC 19 ms
8,004 KB
testcase_20 AC 18 ms
8,080 KB
testcase_21 AC 20 ms
7,940 KB
testcase_22 AC 20 ms
8,380 KB
testcase_23 AC 19 ms
8,504 KB
testcase_24 AC 18 ms
8,084 KB
testcase_25 AC 19 ms
8,024 KB
testcase_26 AC 20 ms
8,472 KB
testcase_27 AC 19 ms
8,628 KB
testcase_28 AC 18 ms
8,008 KB
testcase_29 AC 18 ms
8,548 KB
testcase_30 AC 18 ms
8,012 KB
testcase_31 AC 20 ms
7,920 KB
testcase_32 AC 20 ms
8,012 KB
testcase_33 AC 17 ms
7,964 KB
testcase_34 AC 17 ms
8,036 KB
testcase_35 AC 17 ms
7,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
import heapq

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

Q=[]
for h in H:
    Q.append(-h)

heapq.heapify(Q)

for i in range(A):
    x=-heapq.heappop(Q)
    x=max(0,x-X)
    heapq.heappush(Q,-x)
    

S=-sum(Q)
if S<=Y*B:
    print("Yes")
else:
    print("No")
0