题目链接:http://poj.org/problem?id=3461 和 减花布条 的题对比一下; 求s2中s1的个数kmp模板; #include<stdio.h> #include<iostream> #include<algorithm> #include<string.h> using n Read More
posted @ 2015-09-23 20:56
西瓜不懂柠檬的酸
Views(164)
Comments(0)
Diggs(0)
题目链接:http://poj.org/problem?id=2406 题意:就是求串s能够最多由多少个相同的串a串联而成; 例如 ababab 由3个ab串联而成; abababa 只能由1个abababa组成; kmp中的Next[n](下标从0开始)表示n个元素的前缀和后缀的最大匹配; a b Read More
posted @ 2015-09-23 20:00
西瓜不懂柠檬的酸
Views(118)
Comments(0)
Diggs(0)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2087 kmp模板题: #include <cstdio> #include <cstring> #include <iostream> using namespace std; #define N 11 Read More
posted @ 2015-09-23 15:55
西瓜不懂柠檬的酸
Views(329)
Comments(0)
Diggs(0)
#include#include#include#include#include#includeusing namespace std;#define N 500000#define mod 1000000007__int64 a[N], b[N], ans[N];void Init(){ i... Read More
posted @ 2015-09-23 10:20
西瓜不懂柠檬的酸
Views(365)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号