Perfect Tree Problem | CodeChef