HDOJ 题目3518 Boring counting(后缀数组,求不重叠重复次数最

035 now faced a tough problem,his english teacher gives him a string,which consists with n lower case letter,he must figure out how many substrings appear at least twice,moreover,such apearances can not overlap each other.Take aaaa as an example.”a” apears four times,”aa” apears two times without overlaping.however,aaa can’t apear more than one time without overlaping.since we can get “aaa” from [0-2](The position of string begins with 0) and [1-3]. But the interval [0-2] and [1-3] overlaps each other.So “aaa” can not take into account.Therefore,the answer is 2(“a”,and “aa”).

,于是渐渐开始有些伤怀。

HDOJ 题目3518 Boring counting(后缀数组,求不重叠重复次数最

相关文章:

你感兴趣的文章:

标签云: