結果

問題 No.9 モンスターのレベル上げ
ユーザー szkhtsszkhts
提出日時 2022-04-10 09:43:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 522 bytes
コンパイル時間 731 ms
コンパイル使用メモリ 10,888 KB
実行使用メモリ 13,764 KB
最終ジャッジ日時 2023-08-20 14:03:44
合計ジャッジ時間 7,888 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,480 KB
testcase_01 AC 19 ms
8,476 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

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