摘要: 题目链接:http://acm.hust.edu.cn/vjudge/problem/19282 题目大意:求不同子串的个数 解题思路:后缀数组.. suffix(i)对子串个数所做的贡献为len-sa[i]+1,因为要求要不同的,所以减去与它串重复的子串个数h[i]。即每个后缀对答案的贡献... 阅读全文
posted @ 2016-07-19 13:52 OxQ 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1743 题目大意:有N(1#include#include#include#includeusing namespace std;#define maxn 20100int sa[maxn],rk[maxn],s[maxn],n;i... 阅读全文
posted @ 2016-07-19 11:23 OxQ 阅读(130) 评论(0) 推荐(0) 编辑