Money in Thuvax
CodeChefOpen on judge ↗
The kingdom of Thuvax is divided into N regions. Every pair of regions is connected by atmost 1 road (weighted and bidirectional). Among the N regions, the 0th(zeroth) region is the headquarters, represented by X. The headquarters requires money for the daily functioning of Thuvax. For this, a messenger has to travel to every city in Thuvax informing the people about the requirement of money in th
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