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.
Binary search the repair threshold; each test repairs cheap edges and checks whether a short enough path appears.