摘要: int nxt[maxn];//c++11中next用作数组名会CE nxt[1]=0; for(int i=2,j=0;i<=m;i++){ while(j&&b[i]!=b[j+1]) j=nxt[j]; if(b[i]==b[j+1]) nxt[i]=j+1; } for(int i=1,j= 阅读全文
posted @ 2021-02-10 22:59 DReamLion 阅读(34) 评论(0) 推荐(0) 编辑