欢迎来到蒟蒻mqd的博客

摘要: 题目链接 https://www.luogu.org/problemnew/show/P3808 AC自动机模板 代码 c++ include using namespace std; define N 1000050 int n; char s[N]; struct AC_automation { 阅读全文
posted @ 2019-05-12 13:40 mmqqdd 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://www.luogu.org/problemnew/show/P3375 题目描述 如题,给出两个字符串s1和s2,其中s2为s1的子串,求出s2在s1中所有出现的位置。 为了减少骗分的情况,接下来还要输出子串的前缀数组next。 (如果你不知道这是什么意思也不要问,去百度搜 阅读全文
posted @ 2019-05-12 01:27 mmqqdd 阅读(266) 评论(0) 推荐(0) 编辑