Problem C. Problems on a Tree

HDU - 6334