ZOJ 3686 A Simple Tree Problem