随笔分类 - 5.0 数据结构
摘要:题面 https://www.luogu.org/problem/P2495 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P1712 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P3380 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P1955 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P2146 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P3203 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P4556 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P3396 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P4437 题解 先把依赖关系形成的数建出来。 化一下那个式子,再作差比较一下,发现就是找平均值最大的一段。 然后用线段树维护最大值和单点修改(删除操作),删除一个点就直接把他的儿子接到它父亲上。 细节记得不太清楚了。
阅读全文
摘要:题面 https://www.luogu.org/problem/P3719 题解 煽情:那年我八年级,是我第一次省选省一。那时候也许是我初中第二好的时候吧,八年级下期中,第一次进前$200$($117$名),当上全班第一(清楚的记得那一次$yc$大佬是全校第一),也是第一张省选省一,第一张$CCP
阅读全文
摘要:题面 https://www.luogu.org/problem/P5290 题解 真的是我傻逼,十二省联考$day2$至今还是我的噩梦。$day1$起码一直在调可持久化$trie$树,$day2$真的是一道题都不会写啊。 皮配以为是生成函数,写了$20pts$暴力就放掉了。 春节十二响读错题意,想
阅读全文
摘要:题面 https://www.luogu.org/problem/P4363 题解 很套路的$hash$状态$+dp$。 可知棋子形成的形状一定是一个连续的倒楼梯形(楼梯向右延伸的长度可以不连续,但一定单调) $hash$轮廓就行了。
阅读全文
摘要:题面 https://www.luogu.org/problem/P2607 题解 这道题让我回想起了省选前被$aysn$吊打的故事。 本应该用$tarjan$找环,但是我当年太弱了,写的并查集找环。 最大独立集$dp$(当年我连最大独立集$dp$都不会。说不定现在也不会呢)。
阅读全文
摘要:题面 https://www.luogu.org/problem/P2387 题解 双关键字讨论处理,直接固定一个关键字枚举第二个即可。 $LCT$维护边上信息,拆边。
阅读全文
摘要:题面 https://www.luogu.org/problem/P3960 题解 搬运一下去年的工作。 题解是$splay$,但是我傻逼写的$treap$。 对于$n=1$的情况,$treap$维护序列插入删除,对于$n$任意的情况,动态开点就可以了。
阅读全文
摘要:题面 http://darkbzoj.tk/problem/2555 题解 $LCT$ 维护子树权值和。 注意 $makeroot(x)$ 是真的 $makeroot$。(能看懂的人应该都看懂了) #include<cstdio> #include<iostream> #include<cstrin
阅读全文
摘要:题面 https://www.luogu.org/problem/P4606 题解 又一次被$aysn$吊打。
阅读全文

浙公网安备 33010602011771号