2020 Multi-University Training Contest 8 hdu6858 Discovery of Cycles(Link-Cut Tree判连通性 双指针)
题目T(T#definelcc[x][0]#definercc[x][1]usingnamespacestd;constintN=3e5+9;//f:父亲c:儿子v:单点值s:子树值stk:用于从上到下释放标记的栈r:区间翻转标记intt,n,m,q,mn[N],f[N],c[N][2],stk[N];structedge{intu,v;}e[N];boolr[N];boolnroot(intx)