結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
zer0
|
| 提出日時 | 2020-03-30 23:46:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 323 bytes |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2024-06-23 07:12:35 |
| 合計ジャッジ時間 | 1,756 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 12 |
ソースコード
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)
zer0