摘要:
题意:给一个长度为n的字符串,如果它长度为l(2 2 #define maxn 1000010 3 char str[maxn]; 4 int next[maxn], len; 5 void get_next() 6 { 7 next[0] = -1; 8 int i = 0; 9 int j = -1;10 while (i < len)11 {12 if (j == -1 || str[i] == str[j])13 {14 i++; j++;15 next[i] = ... 阅读全文