結果

問題 No.9 モンスターのレベル上げ
ユーザー ゆるくゆるく
提出日時 2014-10-10 01:14:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 513 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 13,908 KB
最終ジャッジ日時 2023-08-28 20:37:46
合計ジャッジ時間 7,138 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
8,760 KB
testcase_01 AC 20 ms
8,668 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq
from collections import deque
from copy import deepcopy
d = deque()
n = int(input())

a = []

for i in (input().split()):
    heapq.heappush(a,[int(i),0])
b = deque(list(map(int, input().split())))
c = n
ans = 0xFFFFFFFF
while (c):
    tmp = deepcopy(a)
    mx = 0
    for bb in b:
        t = heapq.heappop(tmp)
        t[0] += bb // 2
        t[1] += 1
        heapq.heappush(tmp, t)
        mx = max(mx, t[1])
    c -= 1
    ans = min(ans, mx)
    b.rotate(1)
print(ans)
0