Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes ...
分类:
其他好文 时间:
2016-05-10 12:23:43
阅读次数:
187
1、 概述 LCA(Least Common Ancestors),即最近公共祖先,是指这样一个问题:在有根树中,找出某两个结点u和v最近的公共祖先(另一种说法,离树根最远的公共祖先)。 RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题:对于长度为n ...
分类:
其他好文 时间:
2016-05-10 09:41:35
阅读次数:
246
#include<climits>{ CHAR_BIT /* Maximum length of a multibyte character. */MB_LEN_MAX 1 /* Minimum and maximum values a `signed char' can hold. */SCHAR ...
分类:
其他好文 时间:
2016-05-10 08:26:38
阅读次数:
163
题目为: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4, ...
分类:
其他好文 时间:
2016-05-09 14:15:45
阅读次数:
149
Maximum sum Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 38079 Accepted: 11904 Description Given a set of n integers: A={a1, a2,..., an} ...
分类:
其他好文 时间:
2016-05-08 18:23:36
阅读次数:
181
Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in th ...
分类:
其他好文 时间:
2016-05-08 06:44:03
阅读次数:
146
uva,10684 1 #include <iostream> 2 #include <cstdio> 3 #define maxn 10005 4 using namespace std; 5 6 int main() 7 { 8 int n; 9 int a[maxn]; 10 while(sc ...
分类:
其他好文 时间:
2016-05-07 23:38:35
阅读次数:
241
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1, ...
分类:
Web程序 时间:
2016-05-07 18:02:00
阅读次数:
190