摘要: "HDU 4622 Reincarnation " Problem : 给一个串S(n include using namespace std; const int N = 2008; const int INF = 2000000008; struct suffix_automanon { int 阅读全文
posted @ 2017-07-22 20:46 rpSebastian 阅读(142) 评论(0) 推荐(0) 编辑
摘要: "POJ 3518 Boring " Problem : 给一个串S,询问串S有多个子串出现至少两次且位置不重叠。 Solution : 对S串建立后缀自动机,再建立后缀树,dfs一遍统计处每个结点的子树中最长节点max和最短节点min。枚举一遍后缀自动机的节点,那么对于其对应后缀的长度要求为小于等 阅读全文
posted @ 2017-07-22 19:54 rpSebastian 阅读(139) 评论(0) 推荐(0) 编辑
摘要: "POJ 3415 Common Substrings " Problem : 给两个串S、T (len include using namespace std; const int N = 200008; struct edge { int v, nt; }; struct Suffix_Auto 阅读全文
posted @ 2017-07-22 19:48 rpSebastian 阅读(293) 评论(0) 推荐(0) 编辑