标签 - 后缀数组

? 解题记录 ? ? POJ ? ? 后缀数组 ? ? ST表 ?    2018-12-10 08:34:41    690    0    0
Description The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For example, the repetition number of "ababab" is 3 and "ababa" is 1. Given a string containing lowercase letters, you are
? 解题记录 ? ? SPOJ ? ? 后缀数组 ?    2018-12-05 23:04:22    465    0    0
后缀数组模板题,直接看注释就好了 #include<cstdio> #include<cstring> #include<algorithm> #define LL long long using namespace std; const int maxn = 1e5 + 5; char s[maxn]; LL ans; int SA[maxn], SA2[maxn], RK[maxn], tot[maxn], H[maxn]; //SA : 第一关键字排名为i的开头下标 //SA2 : 第二关键字排名为i的开头下标 //RK : 原字符串中下标为i后缀的
? 解题记录 ? ? SPOJ ? ? 后缀数组 ?    2017-12-09 16:09:16    375    0    0
Given a string, we need to find the total number of its distinct substrings. InputT- number of test cases. T<=20; Each test case consists of one string, whose length is <= 1000 OutputFor each test case output one number saying the number of distinct substrings. ExampleSample Input: 2 CCCCC ABA