POJ 2752 Seek the Name, Seek the Fame
题目大意:给你一个字符串,让你找出这个字符串中有多少满足下列条件的字串:该字串既是母串的前缀,也是字串的后缀。
解题思路:此题着重考察对KMP 算法中的Next 数组的理解。
代码如下:
#include
#include
#include
#include
#include
#include
using namespace std ;
const int MAXN = 40
原创
2014-08-14 23:28:03 ·
809 阅读 ·
0 评论