Gajju Bhai is hungry
CodeChefOpen on judge ↗
Gajju Bhai is very hungry and hence decided to go to a restaurant. The city in which Gajju Bhai lives is a little wierd. All the places (like restaurants, houses, schools, hospital, etc) in the city are labeled by a unique number ranging from 1 to N. And all these places are connected by N-1 roads. Each road is 1 km long. And all the places are connected by atmost 1 road. Gajju Bhai lives at place
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