This problem is in Contest(s) below:
Contest 1018:十月四日
Contest 1338:图的连通性
Contest 1433:图的连通性
Contest 1114:强连通分量,最近公共祖先,树上差分
Contest 1201:树上高级操作
Contest 1504:YC_2021_4月