后缀数组
文章平均质量分 82
圣诞老人家
这个作者很懒,什么都没留下…
展开
-
poj2774 Long Long Message
The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getting ill. Being worried about spending so much on railway tickets (Byte原创 2017-02-06 00:31:29 · 223 阅读 · 0 评论 -
后缀数组模板
sa[i] : 表示 排在第i位的后缀 起始下标rank[i] : 表示后缀 suffix(i)排在第几height[i] : 表示 sa[i-1] 与 sa[i] 的LCP 值后缀数组有两种方法实现1.倍增法模板:const int N = int(2e5)+10;int cmp(int *r,int a,int b,int l)原创 2017-02-11 00:39:06 · 380 阅读 · 0 评论 -
hdu 5769 后缀数组
?? is practicing his program skill, and now he is given a string, he has to calculate the total number of its distinct substrings. But ?? thinks that is too easy, he wants to make this problem more原创 2017-09-04 22:40:21 · 254 阅读 · 0 评论 -
POJ 3693 Maximum repetition substring RMQ+后缀数组
The repetition number of a string is defined as the maximum number R such that the string can be partitioned intoR same consecutive substrings. For example, the repetition number of "ababab" is 3 an原创 2017-02-13 01:05:34 · 236 阅读 · 0 评论 -
后缀数组经典例题
后缀数组:sa[i]:表示排名第i个的首字母位置Rank[i]:第i个数的排名Height[i]:sa[i]和sa[i-1]的最长公共前缀suffix(j) 和suffix(k) 的最长公共前缀为height[rank[j]+1],height[rank[j]+2], height[rank[j]+3], … ,height[rank[k]]中的最小值。原创 2017-02-11 00:42:24 · 1813 阅读 · 0 评论 -
poj2406 Power Strings 后缀数组 DC3算法
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 46554 Accepted: 19489DescriptionGiven two strings a and b we define a*b to be their concate原创 2017-02-11 00:22:52 · 873 阅读 · 0 评论 -
poj1743 Musical Theme 后缀数组之不可重叠最长公共子串
DescriptionA musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this re原创 2017-02-10 17:04:08 · 251 阅读 · 0 评论 -
Distinct Substrings 后缀数组
Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. TEach test case consists of one string, whose length is OutputFor each test case out原创 2017-02-09 01:07:25 · 362 阅读 · 0 评论 -
poj1509 Glass Beads 后缀数组
Once upon a time there was a famous actress. As you may expect, she played mostly Antique Comedies most of all. All the people loved her. But she was not interested in the crowds. Her big hobby were b原创 2017-02-09 00:46:50 · 332 阅读 · 0 评论 -
poj3261 Milk Patterns 后缀数组+二分
Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he can't predict the quality of milk from one day to th原创 2017-02-08 23:50:01 · 260 阅读 · 0 评论 -
poj 3581 Sequence 后缀数组
Given a sequence, {A1, A2, ..., An} which is guaranteedA1 > A2, ..., An, you are to cut it into three sub-sequences and reverse them separately to form a new one which is the smallest possible sequ原创 2017-02-08 13:54:23 · 440 阅读 · 0 评论 -
poj2217 后缀数组
The basic condition of success of a political party, it is the good Election Programme. PSOS know about it, so they entrust the top secretary Juliet with this task. Because she wanted to make her work原创 2017-02-07 00:39:27 · 304 阅读 · 0 评论 -
hdu 6194 后缀数组+RMQ
string string stringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 616 Accepted Submission(s): 171Problem DescriptionUncle M原创 2017-09-11 16:19:07 · 477 阅读 · 0 评论