Problem 2959 · Hard

Number of Possible Sets of Closing Branches

Compute all-pairs distances on the full network, then test every subset of open branches for pairwise distance within maxDistance.

Open the interactive visualisation