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
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
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
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
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
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
题意 输入一个城市的滑雪地图 你可以从高的地方滑到伤下左右低的地方 求这个城市的最长滑雪线路长度 即在一个矩阵中找出最长递减连续序列
令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
题目链接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
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