結果

問題 No.1739 Princess vs. Dragoness (& AoE)
ユーザー mrngmrng
提出日時 2021-11-18 20:33:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,784 ms / 3,000 ms
コード長 326 bytes
コンパイル時間 260 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 128,312 KB
最終ジャッジ日時 2023-08-27 14:23:51
合計ジャッジ時間 35,463 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,044 KB
testcase_01 AC 72 ms
71,172 KB
testcase_02 AC 68 ms
71,116 KB
testcase_03 AC 81 ms
76,056 KB
testcase_04 AC 1,366 ms
127,908 KB
testcase_05 AC 1,660 ms
128,284 KB
testcase_06 AC 890 ms
106,936 KB
testcase_07 AC 81 ms
76,360 KB
testcase_08 AC 255 ms
99,592 KB
testcase_09 AC 341 ms
117,912 KB
testcase_10 AC 940 ms
92,604 KB
testcase_11 AC 610 ms
87,568 KB
testcase_12 AC 101 ms
77,488 KB
testcase_13 AC 895 ms
103,052 KB
testcase_14 AC 1,165 ms
116,444 KB
testcase_15 AC 923 ms
128,052 KB
testcase_16 AC 1,098 ms
88,536 KB
testcase_17 AC 595 ms
98,164 KB
testcase_18 AC 1,177 ms
97,740 KB
testcase_19 AC 258 ms
92,476 KB
testcase_20 AC 221 ms
84,060 KB
testcase_21 AC 545 ms
115,512 KB
testcase_22 AC 923 ms
120,040 KB
testcase_23 AC 1,564 ms
128,160 KB
testcase_24 AC 1,641 ms
128,312 KB
testcase_25 AC 1,784 ms
127,124 KB
testcase_26 AC 1,488 ms
126,188 KB
testcase_27 AC 1,724 ms
126,808 KB
testcase_28 AC 1,502 ms
126,252 KB
testcase_29 AC 1,771 ms
126,836 KB
testcase_30 AC 1,577 ms
127,460 KB
testcase_31 AC 1,432 ms
126,520 KB
testcase_32 AC 1,776 ms
126,368 KB
testcase_33 AC 108 ms
77,536 KB
testcase_34 AC 86 ms
76,732 KB
testcase_35 AC 117 ms
77,180 KB
testcase_36 AC 115 ms
77,320 KB
testcase_37 AC 108 ms
77,260 KB
testcase_38 AC 104 ms
77,176 KB
testcase_39 AC 101 ms
76,836 KB
testcase_40 AC 93 ms
77,092 KB
testcase_41 AC 103 ms
76,904 KB
testcase_42 AC 105 ms
77,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,a,b,x,y = map(int,input().split())
h = list(map(int,input().split()))
from heapq import heappush, heappop
ng,ok = -1,10**9
while ok-ng>1:
	k = (ok+ng)//2
	hq = []
	for i in h:
		heappush(hq,min(0,k-i))
	for i in range(a):
		t = heappop(hq)
		t = min(0,t+x)
		heappush(hq,t)
	if -sum(hq)<=b*y: ok = k
	else: ng = k
print(ok)
0