This problem is in Contest(s) below:
Contest 1130:十月队测题
Contest 1170:备战Noip2018
Contest 1198:树的入门
Contest 1303:树的入门
Contest 1350:树的相关问题
Contest 1371:树的入门
Contest 1414:贵州之树的入门
Contest 1440:树的入门
Contest 1449:YC_树的入门
Contest 1478:初一小朋友树的入门
Contest 1104:Tree Dp从入门到精通