文章分类 -  题解&总结

摘要:P5840 [COCI 2015] Divljak 对 \(S\) 建 ACAM,然后每次插入做一遍多模式匹配,记下每个串被匹配多少次,询问的时候可以直接得到答案。 暴力做不能通过,原因就是每到 \(T\) 的一个位置,要跳很多次 fail 指针,但我们发现其实就是把树上某一个点到根的链 \(+1\ 阅读全文
posted @ 2025-05-27 15:19 chenwenmo 阅读(14) 评论(0) 推荐(0)
摘要:P7177 MRAVI 自底向上 \(\max\) 合并即可,比较容易想。 #include <bits/stdc++.h> using namespace std; using LL = long long; using UI = unsigned int; using ULL = unsigne 阅读全文
posted @ 2025-05-26 11:58 chenwenmo 阅读(15) 评论(0) 推荐(0)
摘要:*2500,组合数学,Ad-hoc,树状数组 阅读全文
posted @ 2025-02-19 22:32 chenwenmo 阅读(19) 评论(0) 推荐(0)
摘要:*3400,分块 阅读全文
posted @ 2025-02-19 20:32 chenwenmo 阅读(17) 评论(0) 推荐(0)
摘要:组合数学,DSU 阅读全文
posted @ 2025-02-19 16:36 chenwenmo 阅读(27) 评论(0) 推荐(1)
摘要:*2500,图论,DSU,DP 阅读全文
posted @ 2025-02-18 12:00 chenwenmo 阅读(21) 评论(0) 推荐(0)
摘要:省选/NOI−,AC自动机,状压DP 阅读全文
posted @ 2025-02-08 18:37 chenwenmo 阅读(17) 评论(0) 推荐(0)
摘要:组合数学,Prufer序列:连通块的生成树计数 阅读全文
posted @ 2025-02-05 15:57 chenwenmo 阅读(26) 评论(1) 推荐(0)
摘要:完成进度:4/6 阅读全文
posted @ 2025-02-03 17:50 chenwenmo 阅读(24) 评论(0) 推荐(0)
摘要:普及/提高−,贪心 阅读全文
posted @ 2025-02-03 14:01 chenwenmo 阅读(10) 评论(0) 推荐(0)
摘要:普及+/提高,数学,Ad-hoc 阅读全文
posted @ 2025-02-03 12:57 chenwenmo 阅读(13) 评论(0) 推荐(0)
摘要:完成进度:5/8 阅读全文
posted @ 2025-01-31 23:31 chenwenmo 阅读(13) 评论(0) 推荐(0)
摘要:树形DP,换根DP 阅读全文
posted @ 2024-11-09 15:08 chenwenmo 阅读(69) 评论(0) 推荐(0)
摘要:*2340,区间DP,数位DP 阅读全文
posted @ 2024-10-11 17:05 chenwenmo 阅读(65) 评论(0) 推荐(0)