Maximize the Revenue
CodeChefOpen on judge ↗
In a country there are $N$ cities numbered $1$ to $N$ and $M$ bidirectional roads connecting all these cities(i.e. There exists a path from every city to every other city). Unfortunately all the roads and tolls on these roads were damaged due to floods. Now the government has to reconstruct these roads so that people can travel from one city to another and they also need to set up toll gates to g
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