結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2020-09-07 13:52:43 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 2,741 ms / 5,000 ms |
| コード長 | 362 bytes |
| 記録 | |
| コンパイル時間 | 350 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-05-23 06:39:12 |
| 合計ジャッジ時間 | 27,364 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
n=int(input())
a=list(map(int, input().split()))
b=list(map(int, input().split()))
b=b+b
import heapq
ans=n
for i in range(n):
que=[[x, 0] for x in a]
heapq.heapify(que)
for x in b[i:i+n]:
p=heapq.heappop(que)
heapq.heappush(que, [p[0]+x//2, p[1]+1])
mx=0
for p in que:
mx=max(mx, p[1])
ans=min(ans, mx)
print(ans)
chocorusk