摘要: [题面传送门](https://www.luogu.com.cn/problem/P5897) 首先注意到这次行数与列数不同阶,列数只有 $200$,而行数高达 $5000$,因此可以考虑以行为下标建线段树,线段树上每个区间 $[l,r]$ 开一个 $200\times 200$ 的数组 $d_{i 阅读全文
posted @ 2021-06-27 23:21 tzc_wk 阅读(87) 评论(0) 推荐(0)
摘要: [Atcoder 题面传送门](https://atcoder.jp/contests/agc033/tasks/arc033_e) & [洛谷题面传送门](https://www.luogu.com.cn/problem/AT4520) 神仙调整+乱搞题。 首先某些人(including me)一 阅读全文
posted @ 2021-06-27 19:07 tzc_wk 阅读(64) 评论(0) 推荐(0)
摘要: [题面传送门](https://www.luogu.com.cn/problem/P4426) 神仙虚树题。 首先考虑最 trival 的情况:$m=n-1$,也就是一棵树的情况。这个我相信刚学树形 $dp$ 的都能够秒掉罢(确信)。直接设 $dp_{i,0/1}$ 在表示 $i$ 的子树内选择,$ 阅读全文
posted @ 2021-06-27 16:48 tzc_wk 阅读(133) 评论(0) 推荐(0)