結果

問題 No.9 モンスターのレベル上げ
コンテスト
ユーザー zer0
提出日時 2020-03-30 23:46:22
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 323 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 616 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 15,616 KB
最終ジャッジ日時 2026-03-07 22:51:34
合計ジャッジ時間 3,594 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import heapq
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
hq = []
for i in a:
    heapq.heappush(hq, [i, 0])


for i in b:
    l, c = heapq.heappop(hq)
    heapq.heappush(hq, [l + (i // 2), c + 1])

ans = 0
while hq:
    l, c = heapq.heappop(hq)
    ans = max(ans, c)

print(ans)
0