結果

問題 No.9 モンスターのレベル上げ
コンテスト
ユーザー szkhts
提出日時 2022-04-10 09:43:51
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
TLE  
実行時間 -
コード長 522 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 567 ms
コンパイル使用メモリ 20,700 KB
実行使用メモリ 15,228 KB
最終ジャッジ日時 2026-05-24 07:30:14
合計ジャッジ時間 8,659 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 TLE * 1 -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import copy

n = int(input())

allies = map(int, input().split())
enemies = list(map(int, input().split()))

allies_mon = []
for i in allies:
    allies_mon.append([i, 0])

max = 0
for i in range(n):
    allies_c = copy.deepcopy(allies_mon)
    m = i
    for _ in range(n):
        j = allies_c.index(min(allies_c))
        allies_c[j][0] += enemies[m] // 2
        allies_c[j][1] += 1
        m += 1
        if m >= n:
            m = 0

    for ac in allies_c:
        if max < ac[1]:
            max = ac[1]

print(max)
0