Problem 2307 · Hard

Check for Contradictions in Equations

Weighted union-find over ratios: a repeated pair of variables must match the ratio implied by their group.

Open the interactive visualisation