##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
| # | Title | Points | Solved | Admin | |
|---|---|---|---|---|---|
You are given a tree with vertices numbered from to .
A subset of vertices is called good if for every two distinct vertices , there exists a vertex such that .
Compute the number of good subsets , modulo .
This tree is a simple path . For example, is good, because for any two distinct vertices , at least one of or has different distances to them, so . On the other hand, is not good, because vertices and have the same distance to , so , and there is no other vertex in to distinguish them.
This tree has a branching at vertex (edges , , ). For example, is good, since every pair of vertices can be distinguished using either or . However, is not good, because vertices and have the same distance to , so .