
KMP应用
deprecated_tzg
这个作者很懒,什么都没留下…
展开
-
hdu 3336 Count the string
求出字符串每个前缀的出现次数之和,用KMP算法中求next数组的变种算出每个字符最远前缀的出现位置#include #include #include #include #include using namespace std;const int maxn = 200005, mod = 10007;int next[maxn];char ch[maxn];int原创 2013-07-14 00:34:28 · 656 阅读 · 0 评论 -
hdu 1711 Number Sequence
最基础KMP模板#include #include #include #include using namespace std;const int MAXN = 1000010;const int MAXM = 10010;int lenT, lenP, next[MAXM];int strT[MAXN], strP[MAXM];void getNext(){ int i原创 2013-09-06 20:29:08 · 505 阅读 · 0 评论 -
hdu 4613 Points( KMP 图形学)
http://acm.hdu.edu.cn/showproblem.php?pid=4613原创 2014-07-15 21:36:21 · 662 阅读 · 0 评论