摘要: KMP KMP别看它短小精悍,用处很大,能应用于很多方面呢。尤其fail (next)数组威力无穷。 void kmp(char *s, int *fail) { int j = fail[0] = -1; rep(i, 1, strlen(s)-1) { while (~j && s[i] != 阅读全文
posted @ 2020-06-01 21:02 AC-Evil 阅读(161) 评论(0) 推荐(0) 编辑