Maximum and Minimum
Chef loves graphs. To express his love, he defines a function $f(G, x, y)$ for an undirected connected graph $G$ with weighted edges and two of its vertices $x$, $y$. $f(G, x, y)$ is defined as the minimum of weights of all paths in $G$ between the vertices $x$ and $y$, where the weight of a path is the maximum of weights of edges in this path. Chef has two connected graphs $G_1$ and $G_2$. Eac
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start