fastle
垆边人似月 皓腕凝霜雪
摘要: /* 最长公共子串 用后缀自动机实现 首先建立一个串的后缀自动机 然后用另一个串在上面跑自动机即可 */ #include #include #include #include #define M 500010 using namespace std; char s[M]; int ch[M][26], fa[M], len[M], lst = 1, cnt = 1; void insert... 阅读全文
posted @ 2018-06-29 21:55 fastle 阅读(150) 评论(0) 推荐(0) 编辑