content属性值 : width:可视区域的宽度,值可为数字或关键词device-width height:同width intial-scale:页面首次被显示是可视区域的缩放级别,取值1.0则页面按实际尺寸显示,无任何缩放 maximum-scale=1.0, minimum-sca...
分类:
Web程序 时间:
2016-01-13 12:36:13
阅读次数:
175
Given an arraynumsand a target valuek, find the maximum length of a subarray that sums tok. If there isn't one, return 0 instead.Example 1:Givennums=[...
分类:
其他好文 时间:
2016-01-12 07:43:37
阅读次数:
219
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...
分类:
其他好文 时间:
2016-01-12 01:07:01
阅读次数:
218
---恢复内容开始---SubsequenceTime Limit:1000MSMemory Limit:65536KTotal Submissions:10487Accepted:4337DescriptionA sequence of N positive integers (10 #inclu...
分类:
其他好文 时间:
2016-01-11 22:05:07
阅读次数:
194
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2016-01-11 17:43:12
阅读次数:
142
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple...
分类:
其他好文 时间:
2016-01-10 19:48:27
阅读次数:
132
题目大意:有n1头公牛和n2头母牛,给出公母之间的m对配对关系,求最大匹配数。数据范围: 1 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 struct Hopcroft_Carp{ 9 ...
分类:
编程语言 时间:
2016-01-10 18:36:09
阅读次数:
707
题目大意:无向图,求最大流。算法讨论:Dinic可过。终于我的常数还是太大。以后要注意下了。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 typede...
分类:
其他好文 时间:
2016-01-10 18:31:08
阅读次数:
183
问题:给定一个无序数组,找出数组排序后的相邻元素最大间隔。要求 O(n) 时间复杂度,O(n)空间复杂度 解题思路: 思路一:将所有数组全部排序,再一次遍历求得最大的相邻元素间隔值即可。但是排序算法的最小时间复杂度也需要 O(n*logn) ,无法满足要求。 思路二:题目只需要求出最大相邻间隔...
分类:
其他好文 时间:
2016-01-10 01:40:27
阅读次数:
188
题目: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,?1,2...
分类:
编程语言 时间:
2016-01-09 12:23:58
阅读次数:
225