摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3065 AC自动机,主要注意的就是两个特征码的重叠情况。code:#include<iostream>#include<cstring>#include<cstdio>usingnamespacestd;constintkind=30;structnode{node*fail;node*next[kind];intcount;intid;node(){fail=NULL;count=0;id=-1;memset(next,NULL,sizeof(next));}}*q[50 阅读全文
posted @ 2012-02-22 01:26 追逐. 阅读(223) 评论(0) 推荐(0) 编辑