Problem 2846 · Hard

Minimum Edge Weight Equilibrium Queries in a Tree

Along a query path, keep the most common edge weight: every other edge on the path must be changed once.

Open the interactive visualisation