<a href="https://www.spoj.com/problems/QTREE/">https://www.spoj.com/problems/QTREE/</a> Input Format . Output Format . Constraints . Notice . Example Input 1 Output 1 Watch Explanation Video tutorial