結果

問題 No.9 モンスターのレベル上げ
ユーザー szkhts
提出日時 2022-04-10 09:43:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 522 bytes
コンパイル時間 664 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 22,656 KB
最終ジャッジ日時 2024-11-30 16:34:20
合計ジャッジ時間 86,509 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 3 TLE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

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