码迷,mamicode.com
首页 >  
搜索关键字:triangle    ( 1341个结果
leetcode:Pascal's Triangle
经典题目,杨辉三角,输入行数,生成杨辉三角的数组...
分类:其他好文   时间:2014-10-24 16:42:49    阅读次数:176
sdut2623--The number of steps(概率dp第一弹)
The number of steps Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述     Mary stands in a strange maze, the maze looks like a triangle(the first layer have one room,the ...
分类:其他好文   时间:2014-10-22 20:22:52    阅读次数:235
Pascal's Triangle
Pascal's Triangle...
分类:其他好文   时间:2014-10-21 21:42:06    阅读次数:176
Pascal's Triangle II
Pascal's Triangle II...
分类:其他好文   时间:2014-10-21 21:40:35    阅读次数:232
LeetCode Pascal's Triangle II
Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(...
分类:其他好文   时间:2014-10-21 19:38:03    阅读次数:251
Pascal's Triangle & II 解题报告
杨辉三角,分别求前n行和第n行。 【求杨辉三角前n行】 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,4,6,4,...
分类:其他好文   时间:2014-10-20 19:32:35    阅读次数:190
HDU 1030 Delta-wave 数学题解
Delta-wave Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5782    Accepted Submission(s): 2204 Problem Description A triangle fiel...
分类:其他好文   时间:2014-10-19 18:43:34    阅读次数:213
ZOJ 2610 Puzzle 模拟
大模拟:枚举6个方向,检查每个0能否移动 Puzzle Time Limit: 2 Seconds      Memory Limit: 65536 KB Little Georgie likes puzzles very much. Recently he has found a wooden triangle in the box with old toys. The...
分类:其他好文   时间:2014-10-18 18:25:06    阅读次数:311
Pascal's Triangle 杨辉三角
GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]...
分类:其他好文   时间:2014-10-18 05:23:21    阅读次数:275
leetcode:Pascal's Triangle II
1、将tri初始化为[1],当rowIndex=0时,return的结果是:1,而题目要求应该是:[1],故将tri初始化为[[1]],返回结果设置为tri[0]即可满足要求;2、最开始第二层循环是从1到i进行遍历,这样就不好控制数据的更新,因为更新第j个数据要用到原tri行的第j-1个数据,而此时...
分类:其他好文   时间:2014-10-17 21:55:39    阅读次数:264
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!