AC自动机
DZYO
Never stop
展开
-
hdu2222:Keywords Search(AC自动机)
Description In the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also wants to bring this feature to his image retrieval system. Every image have a long原创 2017-04-05 23:16:43 · 287 阅读 · 0 评论 -
BZOJ1030: [JSOI2007]文本生成器(AC自动机)
传送门题意: 给n个串,和字符串s的长度t。求满足包含至少一个串的字符串s的个数。题解: 转化为求一个串都不满足的个数。可以直接在AC自动机上DP。但注意比较坑的一点是如果一个串的子串中有不合法的子串的话也是不合法的。#include<bits/stdc++.h> using namespace std; const int Maxn=6e3+50;struct node { node原创 2017-09-11 16:03:21 · 295 阅读 · 0 评论