Problem 2477 · Medium

Minimum Fuel Cost to Report to the Capital

Each city sends its subtree of people upward in cars holding a fixed number of seats, so every edge costs the ceiling of its subtree size over the seats.

Open the interactive visualisation