CM and Jallikattu
CodeChefOpen on judge ↗
In a huge state there are many cities connected by roads without cycles. The Chief Minister decided to conduct a competition (Jallikattu). She needs lot of people to come to the competition so she asks her minister to set the competition in a city where the maximum distance between that city and all other cities that are directly or indirectly connected is minimum. Find this distance. The distance
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