![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
AC自动机
小纪萱苏
这个作者很懒,什么都没留下…
展开
-
hdu DNA repair(AC自动机+DP)
Description Biologists finally invent techniques of repairing DNA that contains segments causing kinds of inherited diseases. For the sake of simplicity, a DNA is represented as a string containi原创 2016-08-03 14:23:47 · 285 阅读 · 0 评论 -
POJ 2778 DNA Sequence (AC 自动机+矩阵)
DNA Sequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15064 Accepted: 5806 Description It's well known that DNA Sequence is a sequence only contains原创 2016-08-04 21:22:48 · 214 阅读 · 0 评论 -
hdu 2296 Ring(AC自动机+DP)
Problem Description For the hope of a forever love, Steven is planning to send a ring to Jane with a romantic string engraved on. The string's length should not exceed N. The careful Steven knows J原创 2016-08-06 16:31:33 · 228 阅读 · 0 评论 -
AC自动机模板
AC自动机主要是用于多模式串的匹配问题,按照我的理解,AC自动机就是在Tire树上实现KMP算法,由于AC自动机加入了失败指针,所以可以把他看成一个状态转移的图。 给出模板 #include #include #include #include #include using namespace std; const int maxnode=240005; const int maxn=1010原创 2016-08-03 11:38:14 · 192 阅读 · 0 评论 -
hdu 2243 考研路茫茫——单词情结(AC自动机+矩阵)
Problem Description 背单词,始终是复习英语的重要环节。在荒废了3年大学生涯后,Lele也终于要开始背单词了。 一天,Lele在某本单词书上看到了一个根据词根来背单词的方法。比如"ab",放在单词前一般表示"相反,变坏,离去"等。 于是Lele想,如果背了N个词根,那这些词根到底会不会在单词里出现呢。更确切的描述是:长度不超过L,只由小写字母组成的,至少包含一个词根原创 2016-08-08 11:35:20 · 482 阅读 · 0 评论