![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
KMP
ChengYuQi621
北京邮电大学人工智能学院
展开
-
OKR-Periods of Words
https://www.luogu.org/problemnew/show/P3435额。。目前80;先占上AC码;#include<bits/stdc++.h>#define ll long long#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)using namespace std;int n,Next[10...原创 2019-07-08 08:26:22 · 167 阅读 · 0 评论 -
【模板】KMP字符串匹配
https://www.luogu.org/problemnew/show/P3375模板啦啦啦,嘿!#include<iostream>#include<cstring>#define MAXN 1000010using namespace std;int kmp[MAXN];int la,lb,j; char a[MAXN],b[MAXN];int m...原创 2019-07-08 08:28:02 · 223 阅读 · 0 评论 -
[BOI2009]Radio Transmission 无线传输
https://www.luogu.org/problemnew/show/P4391#include <iostream>#include <cstring>#include <cstdio>using namespace std;const int M=1000005;char a[M];int n,p[M];void work(){in...原创 2019-07-09 21:20:08 · 206 阅读 · 0 评论 -
Power Strings
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 64619 Accepted: 26649DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "ab...原创 2019-07-04 23:44:40 · 580 阅读 · 0 评论 -
Period
PeriodTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 21636 Accepted: 10529DescriptionFor each prefix of a given string S with N characters (each character has an ASCII code between 9...原创 2019-07-04 23:47:22 · 279 阅读 · 0 评论 -
Seek the Name, Seek the Fame
Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 26879 Accepted: 13949DescriptionThe little cat is so famous, that many couples tramp over hill and dale to ...原创 2019-07-04 23:49:21 · 69 阅读 · 0 评论 -
动物园
https://www.luogu.org/problemnew/show/P2375跑两遍来初始化next与num;#include <iostream>#include <cstring>#include <cstdio>using namespace std;const int M=1000005;const long long OD=10...原创 2019-07-04 23:54:42 · 232 阅读 · 0 评论