摘要:
#include#include#define N 100100void getnext(int next[],char s[]) { int k=-1,j=0;next[0]=-1;while(s[j]!=0) {if(k==-1||s[j]==s[k]) {j++;k++;if(s[j]!=s... 阅读全文
摘要:
//http://www.cnblogs.com/devil-91/archive/2012/05/16/2502710.html#include#define N 110000#includeint dp[N];int main() {int n,m,i,j,a[N],b[N],k,h;while... 阅读全文