This problem is in Contest(s) below:
Contest 1104:Tree Dp从入门到精通