← All problemsSign in

Power Tree

CodeChefRating 2955Open on judge ↗

Ada is one of the best hairdressers in ChefLand. She invented a very cool hair style and named it "power tree". A power tree with degree $l$ — let's denote it by $PT(l)$ — is a directed graph, which can be constructed recursively as follows: - $PT(0)$ consists of a single node. - For $l \gt 0$: - Create one node $u$ — the *root* of power tree $PT(l)$. - Construct all power trees wit

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start