結果

問題 No.9 モンスターのレベル上げ
ユーザー roiti46roiti46
提出日時 2015-02-17 00:06:54
言語 PyPy2
(7.3.8)
結果
AC  
実行時間 1,534 ms / 5,000 ms
コード長 401 bytes
コンパイル時間 450 ms
使用メモリ 93,212 KB
最終ジャッジ日時 2023-01-21 14:16:33
合計ジャッジ時間 17,087 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 84 ms
83,548 KB
testcase_01 AC 84 ms
83,344 KB
testcase_02 AC 1,534 ms
93,164 KB
testcase_03 AC 1,228 ms
91,000 KB
testcase_04 AC 763 ms
88,876 KB
testcase_05 AC 575 ms
89,292 KB
testcase_06 AC 322 ms
88,144 KB
testcase_07 AC 160 ms
86,688 KB
testcase_08 AC 368 ms
87,644 KB
testcase_09 AC 1,496 ms
92,880 KB
testcase_10 AC 86 ms
83,784 KB
testcase_11 AC 1,312 ms
92,040 KB
testcase_12 AC 1,351 ms
92,844 KB
testcase_13 AC 910 ms
90,400 KB
testcase_14 AC 1,530 ms
93,212 KB
testcase_15 AC 1,402 ms
92,364 KB
testcase_16 AC 197 ms
86,956 KB
testcase_17 AC 982 ms
90,020 KB
testcase_18 AC 843 ms
89,640 KB
testcase_19 AC 182 ms
87,216 KB
権限があれば一括ダウンロードができます

ソースコード

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