結果

問題 No.9 モンスターのレベル上げ
ユーザー roiti46roiti46
提出日時 2015-02-17 00:06:54
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 1,669 ms / 5,000 ms
コード長 401 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 77,804 KB
実行使用メモリ 87,448 KB
最終ジャッジ日時 2023-09-06 03:37:49
合計ジャッジ時間 18,246 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
78,200 KB
testcase_01 AC 79 ms
77,996 KB
testcase_02 AC 1,637 ms
87,128 KB
testcase_03 AC 1,383 ms
86,548 KB
testcase_04 AC 813 ms
83,660 KB
testcase_05 AC 595 ms
83,000 KB
testcase_06 AC 330 ms
81,740 KB
testcase_07 AC 147 ms
81,024 KB
testcase_08 AC 376 ms
82,000 KB
testcase_09 AC 1,669 ms
87,436 KB
testcase_10 AC 78 ms
77,972 KB
testcase_11 AC 1,431 ms
86,008 KB
testcase_12 AC 1,572 ms
87,200 KB
testcase_13 AC 1,001 ms
84,940 KB
testcase_14 AC 1,624 ms
87,448 KB
testcase_15 AC 1,503 ms
86,864 KB
testcase_16 AC 187 ms
81,580 KB
testcase_17 AC 1,016 ms
84,232 KB
testcase_18 AC 911 ms
83,480 KB
testcase_19 AC 173 ms
81,204 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