随笔分类 -  ACM--字符串--序列自动机

摘要:托米的咒语(序列自动机) AC_Code 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 3e3+10; 5 const int inf=0x3f3f3f3f; 阅读全文
posted @ 2020-02-16 16:53 swsyya 阅读(171) 评论(0) 推荐(0)
摘要:月月查华华的手机(序列自动机) AC_Code 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 1e6+10; 5 const int inf=0x3f3f3f3 阅读全文
posted @ 2020-02-16 16:51 swsyya 阅读(152) 评论(0) 推荐(0)
摘要:序列:不要求连续 子串:要求连续 AC自动机,kmp都是匹配子串的;序列自动机是匹配序列的 参考博客:https://www.cnblogs.com/31415926535x/p/10504504.html 序列自动机实质还是用空间换时间,它有一个数组 nxt[i][j](nxt[maxn][26] 阅读全文
posted @ 2020-02-16 16:38 swsyya 阅读(238) 评论(0) 推荐(0)

回到顶部