摘要: 题意:略思路:套用ac自动机模板#include #include#includeusing namespace std;char str[11000];int total,head,tail;struct node{ node *next[130]; node *fail; int cnt,id; node(){ fail=NULL; cnt=0; memset(next,NULL,sizeof(next)); }}*q[500000]; void insert(node *root,int id){ node *p=root; int i=0,index; while(str[i])... 阅读全文
posted @ 2014-03-28 21:30 Teemo的技术blog 阅读(112) 评论(0) 推荐(0) 编辑