Problem 2858 · Hard

Minimum Edge Reversals So Every Node Is Reachable

Count the reversals for one root, then move the root across each edge, changing the count by exactly one step.

Open the interactive visualisation