Loading repovive.com/contests/0/problems/G
You are given a tree with vertices labeled to . Vertices are critical.
Choose any non-empty subset .
For each define where is the number of edges on the (unique) path between and in the tree.
Thus each choice of produces a sequence . Count how many distinct sequences can appear over all non-empty , and output the answer modulo .
Where each answer is the count modulo .