Minimize the Total Price of the Trips
Count how often each node is used by the trips, then run a tree DP that halves a node only when its neighbours are not halved.
Count how often each node is used by the trips, then run a tree DP that halves a node only when its neighbours are not halved.