Family tree
CodeChefOpen on judge ↗
A father can have 0,1,or 2 sons. Suppose the input is ABC B-D , it means A has two sons B and C and in turn B has one son D. They are invited at a party. They sit acc. to their ages as eldest first then the sons of eldest and then the sons of second person sitting and so on. If a person has no sons then we leave the spaces . In the above example, the sequence of their sitting is ABC-D. It means 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