Educational Codeforces Round 52 (Rated for Div. 2) F. Up and Down the Tree 树型DP Educational Codeforces Round 52 (Rated for Div. 2) F. Up and Down the Tree 树型DP