Problem 2467 · Medium

Most Profitable Path in a Tree

Bob walks to the root and reaches each node on his path at a fixed time; Alice walks down from the root, and the best leaf is the most profitable path.

Open the interactive visualisation