結果

問題 No.9 モンスターのレベル上げ
ユーザー roiti46roiti46
提出日時 2015-02-17 00:06:09
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 401 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 10,564 KB
最終ジャッジ日時 2023-09-06 01:48:16
合計ジャッジ時間 6,646 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,116 KB
testcase_01 AC 12 ms
6,248 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
N = int(raw_input())
_A = [i*100000 for i in map(int,raw_input().split())]
B = map(int,raw_input().split())

ans = 1500
for sp in xrange(N):
    A = _A[:]
    heapq.heapify(A)
    for i in xrange(sp, N+sp):
        i %= N
        a = heapq.heappop(A)
        a += B[i]/2*100000+1
        heapq.heappush(A,a)
    ans = min(ans, max([heapq.heappop(A)%100000 for i in xrange(N)]))
print ans
0