码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果
CF-85D-Sum of Medians(线段树)
In one well-known algorithm of finding the k-th order statistics we should divide all elements into groups of five consecutive elements and find the median of each five. A median is called the middl...
分类:其他好文   时间:2014-08-25 22:50:55    阅读次数:297
[LeetCode] Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the lon...
分类:其他好文   时间:2014-08-25 11:47:54    阅读次数:172
Poj 2739 Sum of Consecutive Prime Numbers
1.Linkhttp://poj.org/problem?id=27392.ContentSum of Consecutive Prime NumbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 19167Accepted: 1...
分类:其他好文   时间:2014-08-24 20:49:43    阅读次数:186
【Leet Code】Longest Palindromic Substring ——传说中的Manacher算法
Longest Palindromic Substring  Total Accepted: 17474 Total Submissions: 84472My Submissions Given a string S, find the longest palindromic substring in S. You may assume that the maximum l...
分类:其他好文   时间:2014-08-24 16:46:02    阅读次数:190
【Leet Code】Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters  Total Accepted: 20506 Total Submissions: 92223My Submissions Given a string, find the length of the longest substring without repeating char...
分类:其他好文   时间:2014-08-23 21:42:21    阅读次数:359
Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-08-23 21:35:21    阅读次数:264
UVa 10285 Longest Run on a Snowboard(DP 二维最长递减子序列)
题意  输入一个城市的滑雪地图  你可以从高的地方滑到伤下左右低的地方  求这个城市的最长滑雪线路长度   即在一个矩阵中找出最长递减连续序列 令d[i][j]为以格子map(i,j)为起点的最长序列   则有状态转移方程d[i][j]=max{d[a][b]}+1  a,b为与i,j相邻且值比i,j小的所有点 #include #include #include using na...
分类:其他好文   时间:2014-08-23 11:25:20    阅读次数:245
Hdu 1403(后缀数组)
题目链接Longest Common SubstringTime Limit: 8000/4000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4077Accepted Submissio...
分类:其他好文   时间:2014-08-22 12:15:16    阅读次数:330
UVAlive 6763 Modified LCS
LCS stands for longest common subsequence, and it is a well known problem. A sequence in thisproblem means a list of integers, and a sequence X is con...
分类:其他好文   时间:2014-08-22 00:14:45    阅读次数:303
UVa 10285 - Longest Run on a Snowboard
题目:给你一个二维的 分析: 说明:...
分类:其他好文   时间:2014-08-21 13:25:54    阅读次数:287
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!