摘要: 自己写的不知道为什么,degug一下午,还是t,吐了 然后参考大佬的博客https://www.jianshu.com/p/af3cc413d299 阅读全文
posted @ 2020-03-19 18:31 晴屿 阅读(109) 评论(0) 推荐(0) 编辑
摘要: ```#include#include#include#include#includeusing namespace std;const int N=1e5+10;int tr[N][130],n,m,idx,ne[N],ed[N],cnt,cas=1;int vis[N];char str[N];void insert(char str[],int id){ int len=strlen(str... 阅读全文
posted @ 2020-03-19 12:04 晴屿 阅读(87) 评论(0) 推荐(0) 编辑
摘要: ``` //ac自动机 可以优化成 trie图 #include #include #include #include using namespace std; const int N = 10010, S = 55, M = 1000010; int n; //tire 以每个节点结尾的单词数量 int tr[N * S][26], cnt[N * S], idx; //字符串 char str 阅读全文
posted @ 2020-03-19 10:51 晴屿 阅读(102) 评论(0) 推荐(0) 编辑