結果

問題 No.9 モンスターのレベル上げ
コンテスト
ユーザー snneko
提出日時 2019-03-18 19:29:41
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
TLE  
実行時間 -
コード長 361 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 539 ms
コンパイル使用メモリ 20,848 KB
実行使用メモリ 42,720 KB
最終ジャッジ日時 2026-04-02 10:51:37
合計ジャッジ時間 9,782 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 TLE * 1 -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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