結果

問題 No.9 モンスターのレベル上げ
コンテスト
ユーザー warashi
提出日時 2015-02-13 01:58:37
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
TLE  
実行時間 -
コード長 405 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 597 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 31,008 KB
最終ジャッジ日時 2026-03-09 02:13:20
合計ジャッジ時間 87,432 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 3 TLE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/env python3
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
key = lambda x: A[x] * 1501 + won[x]
mintimes = float("inf")
for i in range(-(N - 1), -1):
    won = [0] * N
    for j in range(i, i + N):
        monster = min(range(N), key=key)
        A[monster] += B[j] // 2
        won[monster] += 1
    mintimes = min(mintimes, max(won))
print(mintimes)
0