摘要: KMP模板: 求next数组 //求next数组 for (int i = 2, j = 0; i <= n; i ++ ) { while (j && p[j] != p[j + 1]) j = ne[j]; if (p[i] == p[j + 1]) j ++; ne[i] = j; } 处理母 阅读全文
posted @ 2021-05-24 22:30 rookie161 阅读(79) 评论(0) 推荐(0) 编辑