洛谷 [模板]KMP字符串匹配
又水了一篇 题目链接:https://www.luogu.com.cn/problem/P3375 #include using namespace std; int Next[1000010]={0}; void getNEXT(string str) { Next[0] = -1; int i=-1, j=0; while(j < str.size()) { if(i==-1 || str[j]==str[i]) { i++; j++; Next[j
下载地址
用户评论