
RMQ
Kirito_Acmer
这个作者很懒,什么都没留下…
展开
-
codeforces251A. Points on Line
Little Petya likes points a lot. Recently his mom has presented him n points lying on the line OX. Now Petya is wondering in how many ways he can choose three distinct points so that the distance be原创 2015-05-16 16:07:48 · 1143 阅读 · 0 评论 -
spoj687 REPEATS - Repeats (后缀数组+rmq)
A 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 = abaabaabaabais a (4,3)-repeat with t = aba as原创 2016-04-29 18:15:00 · 570 阅读 · 0 评论 -
poj3693 Maximum repetition substring (后缀数组+rmq)
DescriptionThe 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 "a原创 2016-04-29 22:59:31 · 490 阅读 · 0 评论 -
hdu3530 Subsequence
Problem DescriptionThere is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference between the maximum element and the minimum原创 2015-05-16 11:08:40 · 1163 阅读 · 2 评论 -
hdu5726 GCD(gcd +二分+rmq)
Problem DescriptionGive you a sequence of N(N≤100,000) integers : a1,...,an(0ai≤1000,000,000). There are Q(Q≤100,000) queries. For each query l,r you have to calculate gcd(al,,al+1,...,ar)原创 2016-07-19 20:40:59 · 1184 阅读 · 2 评论