随笔分类 -  5.6 数据结构——Link-cut-tree

摘要:题面 https://www.luogu.org/problem/P4546 题解 泰勒展开一般函数转多项式,$LCT$维护多项式。 阅读全文
posted @ 2019-09-06 23:24 HellPix 阅读(216) 评论(0) 推荐(0)
摘要:题面 https://www.luogu.org/problem/P3690 题解 阅读全文
posted @ 2019-08-28 23:56 HellPix 阅读(155) 评论(0) 推荐(0)
摘要:题面 https://www.luogu.org/problem/P3203 题解 阅读全文
posted @ 2019-08-28 23:28 HellPix 阅读(142) 评论(0) 推荐(0)
摘要:题面 https://www.luogu.org/problem/P2387 题解 双关键字讨论处理,直接固定一个关键字枚举第二个即可。 $LCT$维护边上信息,拆边。 阅读全文
posted @ 2019-08-28 14:31 HellPix 阅读(141) 评论(0) 推荐(0)
摘要:题面 http://darkbzoj.tk/problem/2555 题解 $LCT$ 维护子树权值和。 注意 $makeroot(x)$ 是真的 $makeroot$。(能看懂的人应该都看懂了) #include<cstdio> #include<iostream> #include<cstrin 阅读全文
posted @ 2019-07-31 21:26 HellPix 阅读(146) 评论(0) 推荐(0)
摘要:题面 https://www.luogu.org/problem/P4606 题解 又一次被$aysn$吊打。 阅读全文
posted @ 2019-07-31 19:20 HellPix 阅读(203) 评论(0) 推荐(0)
摘要:题面 https://www.luogu.org/problemnew/show/CF487E 1、$LCT$ 中,翻转懒标记,我是在打上的一刻同时进行翻转左右儿子,所以在 $makeroot(x)$ 的时候 $rev[x] \oplus =1,swap(ch[x][0],ch[x][1])$ 2、 阅读全文
posted @ 2019-06-23 21:15 HellPix 阅读(173) 评论(0) 推荐(0)