随笔分类 - 树刨
摘要:Archie 树链刨分之后很显然就成了一条一条的链 那么用线段树维护一下就行了 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n,m,r,pp; s
阅读全文
摘要:Archie 练习一下树刨 只要记录一下到链顶的距离以及到父亲的距离就行了 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n,m; struct e
阅读全文
摘要:链接Miku 树刨理论 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int maxn=500001; int n,m,s; int fa[ma
阅读全文