Cakewalk in Tree Land
CodeChefOpen on judge ↗
Mr Sheikh and Miss S live in a country named Tree Land. Cities in Tree Land are connected via bi-directional roads. All pair of cities have unique path between them. Mr Sheikh and Miss S are crazy about cakes. They love travelling to different cities to taste varieties of cakes. But the problem is they travel a lot for their respective jobs, so it is not necessary that they are in same cities all
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