
kmp
文章平均质量分 53
Joefery
生命不息,战斗不止。
展开
-
CSU 1598 最长公共前缀 【KMP】
Description给定两个字符串s和t,现有一个扫描器,从s的最左边开始向右扫描,每次扫描到一个t就把这一段删除,输出能发现t的个数。Input第一行包含一个整数T(T每组数据第一行包含一个字符串s,第二行一个字符串t,字符串长度不超过1000000。Output对于每组数据,输出答案。原创 2016-10-08 02:24:31 · 582 阅读 · 0 评论 -
POJ 3461 Oulipo【KMP】
DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair n原创 2016-10-08 02:09:35 · 333 阅读 · 0 评论 -
KMP模版 【KMP】
推荐一个学习的地方 点击打开链接#include#include#include#include #include using namespace std;int Next[15000];char s[100],p[100]; //s是字符串,a是模式串int n,m; //n是s的长度,m是p的长度void getNext(int m){ //得到原创 2016-10-08 01:56:33 · 440 阅读 · 0 评论