摘要: HDU-4622Reincarnation题意:给定一个字符串,有Q次询问,每次询问得出区间[L, R]内有多少个不同的子串。分析:后缀数组搞,不过hash+dp也能够搞定这题,详解见http://www.cnblogs.com/Lyush/p/3233573.html。#include #include #include #include #include #include using namespace std;const int N = 2005;char str[N];int len, seq[N];int sa[N], rank[N], height[N];int wa[N], wb 阅读全文
posted @ 2013-07-31 19:56 沐阳 阅读(666) 评论(0) 推荐(0) 编辑