随笔分类 -  树刨

摘要:Archie 树链刨分之后很显然就成了一条一条的链 那么用线段树维护一下就行了 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n,m,r,pp; s 阅读全文
posted @ 2021-07-21 20:32 Simex 阅读(39) 评论(0) 推荐(0) 编辑
摘要:Archie 练习一下树刨 只要记录一下到链顶的距离以及到父亲的距离就行了 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n,m; struct e 阅读全文
posted @ 2021-07-20 19:40 Simex 阅读(54) 评论(0) 推荐(0) 编辑
摘要:链接Miku 树刨理论 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int maxn=500001; int n,m,s; int fa[ma 阅读全文
posted @ 2020-09-05 20:03 Simex 阅读(109) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示