kmp
明日可7
SDUST_SE_17_QiuPeng
Coding my youth
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
KMP浅谈
分析 设主串(下文中我们称作T)为:a b a c a a b a c a b a c a b a a b b 模式串(下文中我们称作W)为:a b a c a b 用暴力算法匹配字符串过程中,我们会把T[0] 跟 W[0] 匹配,如果相同则匹配下一个字符,直到出现不相同的情况,此时我们会丢弃前面的匹配信息,然后把T[1] 跟 W[0]匹配,循环进行,直到主串结束,或者出现匹配成功的情况。这...原创 2018-04-26 10:54:28 · 686 阅读 · 0 评论 -
POJ 3461 Oulipo(KMP裸)
题目链接:点击打开链接题意:给两个串 求一个串在另一个串中出现的次数。代码:#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <cstring> #include <cmath> #include <ve...原创 2018-04-26 11:06:52 · 333 阅读 · 0 评论 -
HDU 1867 A + B for you again(kmp)
A + B for you againTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8904 Accepted Submission(s): 2159Problem DescriptionGenerally speaking, th...原创 2018-04-26 11:11:22 · 208 阅读 · 0 评论 -
HDU 2595 Simpsons’ Hidden Talents (扩展kmp)
题意:给出串s1,s2 求是否s2的一个后缀等于s1的一个前缀 分析:kmp和exkmp都行 #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <map> #inc...原创 2019-02-16 21:30:02 · 280 阅读 · 0 评论
分享