結果

問題 No.9 モンスターのレベル上げ
ユーザー ayame_pyayame_py
提出日時 2015-10-08 23:00:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 10,896 KB
実行使用メモリ 8,704 KB
最終ジャッジ日時 2023-09-27 08:11:16
合計ジャッジ時間 28,915 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,008 KB
testcase_01 AC 16 ms
8,044 KB
testcase_02 AC 2,854 ms
8,472 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 802 ms
8,436 KB
testcase_06 AC 290 ms
8,136 KB
testcase_07 AC 21 ms
7,992 KB
testcase_08 AC 381 ms
7,928 KB
testcase_09 AC 2,847 ms
8,568 KB
testcase_10 AC 16 ms
8,032 KB
testcase_11 AC 2,582 ms
8,476 KB
testcase_12 WA -
testcase_13 AC 2,562 ms
8,704 KB
testcase_14 AC 2,810 ms
8,652 KB
testcase_15 AC 2,560 ms
8,576 KB
testcase_16 AC 59 ms
7,960 KB
testcase_17 AC 1,670 ms
8,476 KB
testcase_18 WA -
testcase_19 AC 42 ms
8,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
import heapq
N = int(input())
A = list(map(int, input().split()))
B = [int(x)/2 for x in input().split()] * 2
A.sort()
Aheap = [(a, 0) for a in A]

ans = N
for i in range(N):
	a = Aheap[:]
	for j in range(N):
		lv, c = a[0]
		heapq.heapreplace(a, (lv+B[i+j], c+1))
	ans=min(ans, max(c for lv, c in a))

print(ans)
0