
后缀数组
永夜莫明
菜是原罪
展开
-
POJ 1743 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...转载 2019-04-16 16:28:31 · 139 阅读 · 0 评论 -
Common Substrings(后缀数组+单调栈)
https://cn.vjudge.net/problem/POJ-3415A substring of a string T is defined as:T( i, k)= TiTi +1... Ti+k -1, 1≤ i≤ i+k-1≤| T|.Given two strings A, B and one integer K, we define S, a set o...原创 2019-08-28 15:37:22 · 715 阅读 · 0 评论 -
Maximum repetition substring(求重复次数最多的连续重复子串,并且要求字典序最小的 后缀数组+RMQ)
https://cn.vjudge.net/problem/POJ-3693The 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, th...原创 2019-08-28 13:30:48 · 266 阅读 · 0 评论 -
Repeats(思维+后缀数组+RMQ)
https://cn.vjudge.net/problem/SPOJ-REPEATSA string s is called an (k,l)-repeat if s is obtained by concatenating k>=1 times some seed string t with length l>=1. For example, the strings = ab...原创 2019-08-28 12:22:36 · 392 阅读 · 0 评论 -
HDU5008 Boring String Problem (后缀数组+二分+RMQ)
https://cn.vjudge.net/problem/HDU-5008In this problem, you are given a string s and q queries.For each query, you should answer that when all distinct substrings of string s were sorted lexicograp...原创 2019-08-27 22:01:07 · 175 阅读 · 0 评论 -
HDU-6704 K-th occurrence(后缀数组+RMQ+主席树)
http://acm.hdu.edu.cn/showproblem.php?pid=6704Time Limit: 3000/3000 MS (Java/Others)Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 829Accepted Submission(s): 259Problem...原创 2019-08-25 18:30:07 · 419 阅读 · 3 评论 -
Distinct Substrings(不相同的子串个数)
题目链接:https://cn.vjudge.net/problem/SPOJ-DISUBSTRGiven 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...转载 2019-04-24 22:01:11 · 551 阅读 · 0 评论 -
Long Long Message(后缀数组求最长公共子串)
题目链接:https://vjudge.net/problem/POJ-2774The 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...原创 2019-04-28 20:41:46 · 338 阅读 · 0 评论 -
Milk Patterns(后缀数组:可重叠最长重复子串次数大于k)
题目链:https://cn.vjudge.net/contest/295412#problem/BFarmer 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 ...原创 2019-04-24 11:21:54 · 140 阅读 · 0 评论 -
Life Forms (后缀数组——大于k/2个字符串中的最长子串)
https://cn.vjudge.net/problem/POJ-3294You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, eyebrows and...原创 2019-08-29 01:06:19 · 199 阅读 · 0 评论