結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-25 15:59:59 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 648 bytes |
| 記録 | |
| コンパイル時間 | 594 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-03-23 10:24:32 |
| 合計ジャッジ時間 | 14,799 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 14 |
ソースコード
from heapq import heapify, heappush, heapreplace
def main():
""" main """
N = int(input())
FRIENDS = list(map(int, input().split()))
ENEMIES = list(map(int, input().split()))
friends_origin = [(i, 0) for i in FRIENDS]
max_value = float('inf')
# # 的の順番ごとに一つ一つ確認していく
for n in range(N):
friends = friends_origin[:]
enemies = ENEMIES[n:] + ENEMIES[:n]
for enemy in enemies:
lv, cnt = friends[0]
heapreplace(friends, (lv+enemy//2, cnt+1))
max_value = min(max_value, max(cnt for lv, cnt in friends))
print(max_value)
main()