leetcode 新增题目Maximum Product Subarray...
分类:
其他好文 时间:
2014-09-24 17:56:57
阅读次数:
148
【求最大深度】Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
这里说的最大深度是指最深叶子节点到根节点的路径长度
...
分类:
其他好文 时间:
2014-09-24 16:09:37
阅读次数:
200
题目信息:
1007. Maximum Subsequence Sum (25)
时间限制
400 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
Given a sequence of K i...
分类:
其他好文 时间:
2014-09-24 11:12:56
阅读次数:
364
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Your goal i...
分类:
其他好文 时间:
2014-09-23 20:15:26
阅读次数:
142
Configuring the Gesture Recognizer@property(nonatomic) NSUInteger maximumNumberOfTouches//The maximum number of fingers that can be touching the view ...
分类:
其他好文 时间:
2014-09-22 19:04:23
阅读次数:
241
[leetcode]Given a binary tree, find its maximum depth....
分类:
其他好文 时间:
2014-09-22 13:24:42
阅读次数:
114
题目:
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 complete as many transactions as you like (i...
分类:
其他好文 时间:
2014-09-21 03:10:29
阅读次数:
265
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line思路:最多的点,必然是点连成线时,所有斜率相同的最多的组合情况; 那么如果不在同一直线点的组合也可能斜率.....
分类:
其他好文 时间:
2014-09-20 02:14:26
阅读次数:
270
题目:求不超过n的最大的x/φ(x),其中φ(x)是欧拉函数。
分析:数论,大整数。比赛时直接打表计算的。
实际上:φ(n)= n *(1 - 1/p1)*(1 - 1/p2)*(1 - 1/p3)*…*(1 - 1/pt);
所以有:x/φ(x)= 1 /((1 - 1/p1)*(1 - 1/p2)*(1 - 1/p3)*…*(1 - 1/pt)...
分类:
其他好文 时间:
2014-09-18 18:58:14
阅读次数:
148
题目:找到一个序列中的两个连续段使得他们的和最大。
分析:dp,最大字段和。双向求最大字段和,枚举结束点找到加和最大值。
说明:与合唱队形类似。(同poj2593)(2011-09-24 02:09)
#include
#include
int data[ 50005 ];
int asum[ 50005 ];
int bsum[ 50005 ];
void msum( int *D...
分类:
其他好文 时间:
2014-09-17 21:53:22
阅读次数:
233