There is a directed weighted graph with N vertices numbered 0 to N−1. For every ordered pair of distinct vertices x and y there is one edge from x to y, so the graph has N×(N−1) edges in total.
Choose some of these edges to build a new graph. Using only the chosen edges, a path from any vertex u to any vertex v must always exist. For example, when N=3 you may choose 0⇒1, 1⇒0, 0⇒2, 2⇒0, and you may also choose 0⇒1, 1⇒2, 2⇒0.
Among the chosen edges, make the difference between the largest weight and the smallest weight as small as possible. Find the minimum of that difference over all valid choices. When N=1 there is no edge to choose, so the answer is 0.