← All problemsSign in

Maximum MST

CodeChefRating 1620Open on judge ↗

There was a weighted undirected complete graph on $N$ vertices with $M = \frac{N \cdot (N - 1)}{2}$ edges, one edge between every pair of vertices. Unfortunately, the weights have been scrambled, and while we have recovered the multiset of weights, we do not know which edge had which weight. You are given a sequence $W_1, W_2, \ldots, W_M$. Among all possible assignments of weights, what is the

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start