結果

問題 No.9 モンスターのレベル上げ
ユーザー snnekosnneko
提出日時 2019-03-18 19:29:41
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 361 bytes
コンパイル時間 134 ms
コンパイル使用メモリ 10,860 KB
実行使用メモリ 29,644 KB
最終ジャッジ日時 2023-09-25 20:55:26
合計ジャッジ時間 10,749 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
29,644 KB
testcase_01 AC 132 ms
29,624 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 numpy as np
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

C = [0] * len(A)

for b in B:
    D = [i for i, x in enumerate(A) \
         if x == min(A)]
    C_ = [C[x] for x in D]
    T = [x for x in D if C[x] == min(C_) and A[x]  == min(A)]
    idx = T[0]
    A[idx] += (b//2)
    C[idx] += 1
    
print(max(C))
0