码迷,mamicode.com
首页 >  
搜索关键字:triangle    ( 1341个结果
六阶杨辉三角
/** * 使用多重循环打印6阶杨辉三角*/public class YangHui { public static void main(String[] args){ int[][] triangle=new int[6][6]; int i,j,k=0; for(i=0;i<tria...
分类:其他好文   时间:2014-08-09 22:56:29    阅读次数:263
The Angles of a Triangle
The Angles of a TriangleYou are given the lengths for each side on a triangle. You need to find all three angles for this triangle. If the given side ...
分类:其他好文   时间:2014-08-08 18:04:36    阅读次数:234
三角形的两边长大雨另一边
import java.util.Scanner;public class Triangle { public static void main(String[] args){ double d; System.out.println("请输入三角形的三条边的长度!...
分类:其他好文   时间:2014-08-07 21:37:50    阅读次数:268
Pascal's Triangle II
问题:输出杨辉三角的第n行class Solution {public: vector getRow(int rowIndex) { vector vec; int a[100][100]; a[0][0]=1; int j,i; ...
分类:其他好文   时间:2014-08-06 22:03:42    阅读次数:214
POJ 1163 The Triangle DP题解
寻找路径,动态规划法题解。 本题和Leetcode的triangle题目差不多一样的,本题要求的是找到最大路径和。 逆向思维,从底往上查找起就可以了。 因为从上往下可以扩展到很多路径,而从下往上个点的路径是由两条缩减到一条。 这样就可以很简单记录最大路径了。 #include const short MAX_ROW = 101; short triangle[MAX_ROW][MAX_...
分类:其他好文   时间:2014-08-06 10:27:11    阅读次数:190
hdu 1030
Delta-wave Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5611    Accepted Submission(s): 2137 Problem Description A triangle field...
分类:其他好文   时间:2014-08-05 19:24:20    阅读次数:235
A trip through the Graphics Pipeline 2011_06_(Triangle) rasterization and setup
Welcome back. This time we’re actually gonna see triangles being rasterized – finally! But before we can rasterize triangles, we need to do triangl...
分类:其他好文   时间:2014-08-05 00:25:38    阅读次数:476
[LeetCode] Pascal's Triangle II
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 us...
分类:其他好文   时间:2014-08-03 23:10:36    阅读次数:179
[LeetCode] Triangle('Bottom-up' DP)
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 fol...
分类:其他好文   时间:2014-08-03 22:59:56    阅读次数:259
Pascal's Triangle
问题:输出杨辉三角分析:对于每一行收尾都等于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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!