Recently I have come across a problem of an IUPC contest, where the problem asks for the summation of the mex value of all subtrees of a tree for each vertex where the vertex is the root of the tree. The detailed statement is given below or can be found in [Your text to link here...I-Mexy](https://toph.co/c/cuet-inter-university-codestorm-1-0)(I-Mexy).↵
↵
↵
Can anyone give me hints or provide any resources about this topic?
↵
↵
Can anyone give me hints or provide any resources about this topic?