一、题目描述 二、算法分析说明与代码编写指导 三、AC 代码(总时间:381 ms) 题目要求对 b 串构造 z 数组时记 z[0] = strlen(b)。 #include<cstdio> #include<cstring> #pragma warning(disable:4996) template<class _Zty> inline void extKMP(const char* const _Str, _Zty* const _Z, const _Zty& _Strlen) { _Zty L = 0, R = 0