随笔分类 - 5.6 数据结构——Link-cut-tree
摘要:题面 https://www.luogu.org/problem/P4546 题解 泰勒展开一般函数转多项式,$LCT$维护多项式。
阅读全文
摘要:题面 https://www.luogu.org/problem/P3690 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P3203 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P2387 题解 双关键字讨论处理,直接固定一个关键字枚举第二个即可。 $LCT$维护边上信息,拆边。
阅读全文
摘要:题面 http://darkbzoj.tk/problem/2555 题解 $LCT$ 维护子树权值和。 注意 $makeroot(x)$ 是真的 $makeroot$。(能看懂的人应该都看懂了) #include<cstdio> #include<iostream> #include<cstrin
阅读全文
摘要:题面 https://www.luogu.org/problem/P4606 题解 又一次被$aysn$吊打。
阅读全文
摘要:题面 https://www.luogu.org/problemnew/show/CF487E 1、$LCT$ 中,翻转懒标记,我是在打上的一刻同时进行翻转左右儿子,所以在 $makeroot(x)$ 的时候 $rev[x] \oplus =1,swap(ch[x][0],ch[x][1])$ 2、
阅读全文

浙公网安备 33010602011771号