随笔分类 - AC_自动机
摘要:#include #include #include #include using namespace std;const int maxn = 130;struct node{ bool flg; int id; node *next[maxn],*fail; void Node(){ fail = NULL; flg = false; memset(next,NULL,sizeof(next)); }}arr[500000],*que[500000];int vis[505],num[10],cnt;char str[...
阅读全文
摘要:http://blog.csdn.net/niushuai666/article/details/7002823#include #include #include using namespace std;struct node{ int count; node *next[26],*fail; void Node(){ count = 0;fail = NULL; memset(next,NULL,sizeof(next)); }}arr[300005],*que[500005];char str[1000006];int cnt = 0;...
阅读全文

浙公网安备 33010602011771号