You are given a tree containing $N$
nodes. The nodes are numbered from $1$
to $N$
. The root node of that tree is $R$
. Every node in that tree is associated with a value. Let, $X_u$
be the value associated with node $u$
.
This is a companion discussion topic for the original entry at https://toph.co/p/simple-and