Problem 3778 · Medium

Minimum Distance Excluding One Maximum Weighted Edge

Run Dijkstra on two layers per node, one before and one after an edge is waived, and read the cheaper finish.

Open the interactive visualisation