摘要: 思路 注意重复字符串可以重叠!!!比如 $aba$ 重复两次就可以是 $ababa$ 。 代码 #include <iostream> #include <cstdio> #include <cstring> using namespace std; const int N = 1000010; i 阅读全文
posted @ 2022-08-30 17:21 incra 阅读(26) 评论(0) 推荐(0)
摘要: 题目链接 思路 我们对所有字符串建 $Trie$ 树,求答案时,直接在插入新的字符串的时候,把答案更新一下就好了。 代码 #include <iostream> #include <cstdio> #include <cstring> using namespace std; typedef pai 阅读全文
posted @ 2022-08-30 14:58 incra 阅读(35) 评论(0) 推荐(0)