摘要: 4530: [Bjoi2014]大融合【题目描述】 传送门【题解】 我们需要维护两个值,子树的信息(W[])和虚儿子(a[])的信息。void PushUp(int x){if(x) W[x]=W[Son[x][0]]+W[Son[x][1]]+a[x]+1... 阅读全文
posted @ 2018-07-05 22:02 XSamsara 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 2049: [Sdoi2008]Cave 洞穴勘测【题目描述】 传送门【题解】 裸地link Cut Tree。最近刚学,所以打了一些模板题。代码如下#include#include#define MAXN 10005using namespace std... 阅读全文
posted @ 2018-07-05 11:17 XSamsara 阅读(87) 评论(0) 推荐(0) 编辑