結果

問題 No.9 モンスターのレベル上げ
ユーザー gigurururugigurururu
提出日時 2014-11-05 21:35:32
言語 Python2
(2.7.18)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 414 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 6,588 KB
実行使用メモリ 6,904 KB
最終ジャッジ日時 2023-08-29 00:43:12
合計ジャッジ時間 43,347 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
6,336 KB
testcase_01 AC 13 ms
6,332 KB
testcase_02 AC 4,326 ms
6,880 KB
testcase_03 AC 3,385 ms
6,736 KB
testcase_04 AC 1,822 ms
6,660 KB
testcase_05 AC 1,215 ms
6,628 KB
testcase_06 AC 430 ms
6,520 KB
testcase_07 AC 19 ms
6,440 KB
testcase_08 AC 562 ms
6,600 KB
testcase_09 AC 4,104 ms
6,888 KB
testcase_10 AC 12 ms
6,548 KB
testcase_11 AC 3,928 ms
6,800 KB
testcase_12 TLE -
testcase_13 AC 3,934 ms
6,860 KB
testcase_14 AC 4,230 ms
6,796 KB
testcase_15 AC 3,922 ms
6,760 KB
testcase_16 AC 81 ms
6,520 KB
testcase_17 AC 2,513 ms
6,724 KB
testcase_18 AC 2,116 ms
6,800 KB
testcase_19 AC 54 ms
6,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq
from collections import deque

n=input()
a=map(int,raw_input().split())+[1e9]
b=deque(map(int,raw_input().split()))

max_list=[]

for _ in range(n):
    pq=[(j,0) for j in a]
    heapq.heapify(pq)
    for elevel in b:
        level,cnt=heapq.heappop(pq)
        heapq.heappush(pq,(level+elevel/2,cnt+1))
    max_list.append(max([y for x,y in pq]))
    b.rotate()

print min(max_list)
0