Lanku and mysterious country
CodeChefOpen on judge ↗
Lanku lives in a mysterious country having N cities. In his country instead of one capital, any number of cities can be capital. There are many cities in his country, but only the capital cities have all the facilities like hospitals, markets etc. So in order to get anything you have to visit the capital city. In order to simplify it, every city has been assigned to exactly one capital city. Ap
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