2021-01-08
#include
#include
using namespace std;
void GetNext(int next[], string t){
int j=0,k=-1;
next[0]=-1;
while(j<t.length()-1){
if(k==-1||t[j]==t[k]){
j++;k++;
next[j]=k;
}
else k=next[k];
}
}
void getPosi(string s, string t){
int next[t.length()];
int i=0,
原创
2021-01-08 11:21:44 ·
44 阅读 ·
0 评论