結果
| 問題 |
No.9 モンスターのレベル上げ
|
| ユーザー |
|
| 提出日時 | 2019-10-23 22:15:12 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 421 bytes |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-07-07 05:09:25 |
| 合計ジャッジ時間 | 26,918 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 11 |
ソースコード
from heapq import heapify, heappop, heappush
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
myMonster = [(a, 0) for a in A]
heapify(myMonster)
ans = float('inf')
for start in range(N):
A = myMonster[:]
for b in B[start:] + B[:start]:
now, time = heappop(A)
now += b // 2
heappush(A, (now, time + 1))
ans = max([a for _, a in A])
print(ans)