摘要: #include<bits/stdc++.h> using namespace std; char A[1007],B[1007]; int P[1007],n,m; void pre() { P[1]=0; int j=0; for(int i=1;i<m;i++) { while(j>0 && B[j+1]!=B[i+1]) j=P[j]; if(B[j+1]==B[i+1]) j++; P[ 阅读全文
posted @ 2019-08-13 18:58 octal_zhihao 阅读(136) 评论(0) 推荐(0) 编辑