H. MilestonesTime Limit: 1 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100114DescriptionThe longest road of the Fairy Kingdom has n milestone...
分类:
编程语言 时间:
2015-09-03 20:19:57
阅读次数:
186
leetcode刷题整理:1——Two Sum(哈希表hashtable,map)2——Add Two Numbers(链表)3——Longest Substring Without Repeating Characters(set,哈希表,两个指针)9——Palindrome Number (数学...
分类:
其他好文 时间:
2015-09-03 20:18:49
阅读次数:
190
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-09-03 01:52:10
阅读次数:
287
题目:Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", t.....
分类:
其他好文 时间:
2015-09-02 20:42:12
阅读次数:
176
Description:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeatin...
分类:
其他好文 时间:
2015-09-02 17:20:56
阅读次数:
101
Description:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one uniqu...
分类:
其他好文 时间:
2015-09-02 15:57:57
阅读次数:
218
1. LISO (n^2):/* LIS(Longest Increasing Subsequence) 最长上升子序列 O (n ^ 2) 状态转移方程:dp[i] = max (dp[j]) + 1 (a[j] res; int i; for (i=pos[len]; ~fa[i]; i=fa....
分类:
其他好文 时间:
2015-09-02 13:43:44
阅读次数:
157
题意是给出一个N,将所有分母小于N的非负分数排序输出。/*ID: modengd1PROG: frac1LANG: C++*/#include #include #include #include using namespace std;bool vis[261][261];//判重,枚举出来之后的...
分类:
其他好文 时间:
2015-09-02 00:12:06
阅读次数:
167
https://leetcode.com/problems/longest-palindromic-substring/manacher算法相关:http://blog.csdn.net/ywhorizen/article/details/6629268class Solution {public:...
分类:
编程语言 时间:
2015-09-01 21:33:57
阅读次数:
168
https://leetcode.com/problems/longest-palindromic-substring/manacher算法:http://blog.csdn.net/ywhorizen/article/details/6629268string longestPalindrome(...
分类:
编程语言 时间:
2015-09-01 18:28:26
阅读次数:
131