码迷,mamicode.com
首页 >  
搜索关键字:substrings    ( 383个结果
[leetcode] Scramble String @python
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:编程语言   时间:2014-09-30 02:51:41    阅读次数:394
POJ - 3415 Common Substrings(后缀数组求长度不小于 k 的公共子串的个数+单调栈优化)
Description A 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 of triples (i, j, k): S = ...
分类:其他好文   时间:2014-09-29 14:38:51    阅读次数:277
POJ - 3693 Maximum repetition substring(后缀数组求重复次数最多的连续重复子串)
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 ...
分类:其他好文   时间:2014-09-28 19:34:34    阅读次数:417
uva 10829 - L-Gap Substrings(后缀数组)
题目链接:uva 10829 - L-Gap Substrings 题目大意:给定一个字符串,问有多少字符串满足UVU的形式,要求U非空,V的长度为g。 解题思路;对字符串的正序和逆序构建后缀数组,然后枚举U的长度l,每次以长度l分区间,在l和l+d+g所在的两个区间上确定U的最大长度。 #include #include #include #include using n...
分类:其他好文   时间:2014-09-05 23:53:42    阅读次数:387
[leecode]Scramble String
Scramble StringGiven a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible...
分类:其他好文   时间:2014-09-02 00:17:33    阅读次数:260
LeetCode: Scramble String
LeetCode: Scramble StringGiven a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is o...
分类:其他好文   时间:2014-09-01 22:42:34    阅读次数:308
UVA 10829 - L-Gap Substrings(后缀数组)
UVA 10829 - L-Gap Substrings 题目链接 题意:一个字符串如果形如UGU,的形式,G的长度为L,那么称这个字符串为L串,给定一个字符串,问这个字符串子串为g串的个数 思路:做这题前先做了POJ3693,有一个思想就是枚举长度分段,这样的话对于一个U长度为l的而言,只要在当前位置和当前位置之后(l + g)的位置分别向前向后找lcp,两个lcp加起来的长度...
分类:其他好文   时间:2014-08-23 20:24:21    阅读次数:349
Scramble String
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio...
分类:其他好文   时间:2014-08-21 00:01:23    阅读次数:293
[LeetCode] Scramble String(树的问题最易用递归)
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio...
分类:其他好文   时间:2014-08-13 22:17:17    阅读次数:189
spoj694--Distinct Substrings
个人第一道后缀数组题目。对于每一个后缀suffix(i),都有len-sa[i]个前缀(也即有len-sa[i]个不同的字符串),其中与排名前一位的后缀有height[i]个共同的前缀,最后所得到的新的字符串个数为len-sa[i]-height[i].因此这题只要求出sa以及height即可求得答...
分类:其他好文   时间:2014-08-12 18:14:44    阅读次数:231
383条   上一页 1 ... 34 35 36 37 38 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!