Problem 3807 · Medium

Minimum Cost to Repair Edges to Traverse a Graph

Binary search the repair threshold; each test repairs cheap edges and checks whether a short enough path appears.

Open the interactive visualisation