问题:输出杨辉三角分析:对于每一行收尾都等于1,其他位置f[i,j]=f[i-1,j-1]+f[i-1,j]class Solution {public: vector > generate(int numRows) { int i,j; if(numRows==0...
分类:
其他好文 时间:
2014-08-03 22:55:26
阅读次数:
186
Triangle LOVE
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 2455 Accepted Submission(s): 997
Problem Description
Recently, sci...
分类:
其他好文 时间:
2014-08-03 12:50:05
阅读次数:
238
题目:Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to ....
分类:
编程语言 时间:
2014-08-03 05:24:06
阅读次数:
304
题目:Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1...
分类:
编程语言 时间:
2014-08-03 05:16:25
阅读次数:
303
题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the....
分类:
编程语言 时间:
2014-08-03 04:40:04
阅读次数:
351
Suppose we have a framefinal JFrame jframe = new JFrame("Triangle 3");To catch window closing events and quit, there are two ways (as I know):Way1.jfr...
详解Ray-Triangle交叉检测算法,并且提供代码示例,供您参考...
分类:
其他好文 时间:
2014-08-01 13:47:21
阅读次数:
284
Problem Description
Recently, scientists find that there is love between any of two people. For example, between A and B, if A don’t love B, then B must love A, vice versa. And there is no possibilit...
分类:
其他好文 时间:
2014-07-30 17:38:04
阅读次数:
287
poj1010——邮票问题
DFS
poj1011——Sticks dfs + 剪枝
poj1020——拼蛋糕
poj1054——The Troublesome Frog
poj1062——昂贵的聘礼
poj1077——Eight
poj1084——Square Destroyer
poj1085——Triangle War(博弈,極大極小搜索+alpha_beta剪枝)
po...
分类:
其他好文 时间:
2014-07-29 18:07:12
阅读次数:
294