Help required in this problem I tried it doing using centroid Decompostion

This is a problem of ICPC Amritapuri Practise round held on codeDrills
here is the link to the problem statement:CodeDrills(Problem Name: Tree Parenthesis)
here is my code:ngFGwE - Online C++ Compiler & Debugging Tool -
Anyone having precise knowledge of the topic or willing to have a discussion over it is welcome.

1 Like