摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2896题意:给n个模式串m个文本串,问每个文本串里出现了哪些模式串。每个模式串唯一。ac自动机中,用end数组把模式串的id记录下来就好。#include#include#include#inclu... 阅读全文
posted @ 2015-05-06 21:06 DSChan 阅读(99) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2222 题意:给一堆模式串和一个文本串,问有多少个模式串在文本串中出现过。AC自动机,在统计答案的时候记得将end清零就好#include#include#include#include#inclu... 阅读全文
posted @ 2015-05-06 20:38 DSChan 阅读(103) 评论(0) 推荐(0) 编辑