結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2020-09-07 13:58:40 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 2,284 ms / 5,000 ms |
| コード長 | 353 bytes |
| 記録 | |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-05-23 06:40:40 |
| 合計ジャッジ時間 | 22,348 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=que[0]
heapq.heappushpop(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