This problem is in Contest(s) below:
Contest 1198:树的入门
Contest 1114:强连通分量,最近公共祖先,树上差分
Contest 1303:树的入门
Contest 1350:树的相关问题
Contest 1371:树的入门
Contest 1414:贵州之树的入门
Contest 1440:树的入门
Contest 1449:YC_树的入门
Contest 1497:YC_2021