码迷,mamicode.com
首页 >  
搜索关键字:triangle    ( 1341个结果
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-11-06 16:41:45    阅读次数:165
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-11-06 16:27:43    阅读次数:182
【jsp 练习】 给定三角形三边判断是否能组成三角形及计算面积
Test.javapackage package1;public class Test { double side1 = -1 , side2 = -1 , side3 = -1 , area = -1; boolean triangle; public double ge...
分类:Web程序   时间:2014-11-05 09:11:13    阅读次数:208
[LeetCode] Triangle 解题记录
题目描述: 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 following triangle [ [2], ...
分类:其他好文   时间:2014-11-04 19:41:37    阅读次数:205
leetcode-pascal triangle I&&II
对于第2个pascal triangle,通过观察可以发现,其实只需要2个额外的变量来记录,于是就设了个tmp数组。整体有点DP问题中的滚动数组的感觉。 1 #include 2 #include 3 using namespace std; 4 5 class Solution { 6 pu...
分类:其他好文   时间:2014-11-02 17:48:31    阅读次数:193
POJ 1927 Area in Triangle(计算几何)
Area in Triangle 博客原文地址: 题目大意:...
分类:其他好文   时间:2014-11-02 15:04:45    阅读次数:167
[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-11-02 12:11:32    阅读次数:138
[Leetcode] 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-11-02 07:04:34    阅读次数:190
ZOJ 3647 Gao the Grid(居然是暴力)
A n * m grid as follow: Count the number of triangles, three of whose vertice must be grid-points. Note that the three vertice of the triangle must not be in a line(the right picture is not a...
分类:其他好文   时间:2014-10-31 22:20:02    阅读次数:264
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-31 08:47:11    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!