結果

問題 No.9 モンスターのレベル上げ
ユーザー gigurururugigurururu
提出日時 2014-11-05 21:35:32
言語 Python2
(2.7.18)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 414 bytes
コンパイル時間 31 ms
使用メモリ 7,000 KB
最終ジャッジ日時 2023-01-16 12:16:12
合計ジャッジ時間 43,307 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 12 ms
6,372 KB
testcase_01 AC 11 ms
6,384 KB
testcase_02 AC 4,299 ms
6,888 KB
testcase_03 AC 3,350 ms
6,908 KB
testcase_04 AC 1,796 ms
6,824 KB
testcase_05 AC 1,221 ms
6,624 KB
testcase_06 AC 421 ms
6,768 KB
testcase_07 AC 20 ms
6,380 KB
testcase_08 AC 570 ms
6,536 KB
testcase_09 AC 4,172 ms
6,852 KB
testcase_10 AC 12 ms
6,400 KB
testcase_11 AC 3,879 ms
7,000 KB
testcase_12 TLE -
testcase_13 AC 3,886 ms
6,804 KB
testcase_14 AC 4,172 ms
6,832 KB
testcase_15 AC 3,816 ms
6,936 KB
testcase_16 AC 79 ms
6,564 KB
testcase_17 AC 2,451 ms
6,960 KB
testcase_18 AC 2,054 ms
6,852 KB
testcase_19 AC 50 ms
6,404 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