摘要:
都说是用KMP,粗人,我就暴力一点过了吧 1 #include <iostream> 2 using namespace std; 3 char str[100000005]; 4 int main() 5 { 6 int i, k, p, len; 7 while (scanf("%s", str) != EOF && str[0] != '.') 8 { 9 len = strlen(str);10 p = k = 1;11 for (i=0; i<len; i++)12 {13 ... 阅读全文