摘要: 题意:找出原串中出现超过2次的子串的数目,每个子串出现多次时不可重叠。分析:枚举子串的长度len,找到满足连续的height[i]>=len的最左端 l 和最右端的位置 r,如果r-l>=len说明子串没有重叠。View Code #include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int maxn = 1005;int N;char s[maxn];int sa[maxn],t[maxn],t2[maxn],c[maxn];void s 阅读全文
posted @ 2013-02-15 17:59 'wind 阅读(256) 评论(0) 推荐(0) 编辑