import java.util.Scanner;public class Triangle { public static void main(String[] args){ Scanner scan=new Scanner(System.in);//创建扫描器 Syst...
分类:
其他好文 时间:
2015-05-18 22:47:27
阅读次数:
149
public class Triangle{ public static void main(String[] args){ int triangle[][]=new int[10][]; for(int i=0;i<triangle.length;i++){ ...
分类:
其他好文 时间:
2015-05-18 22:43:12
阅读次数:
147
import java.util.Scanner;public class Triangle { public static void main(String[] args){ Scanner scan=new Scanner(System.in);//创建扫描器 Sys...
分类:
其他好文 时间:
2015-05-18 22:30:14
阅读次数:
137
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],
[3,4],
[...
分类:
其他好文 时间:
2015-05-17 18:51:14
阅读次数:
100
1.TriangleGiven 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, gi...
分类:
编程语言 时间:
2015-05-17 18:19:11
阅读次数:
187
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 use only O(k) extra space?
基本思路:
内层循环,使用...
分类:
其他好文 时间:
2015-05-17 16:51:36
阅读次数:
111
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,1]
]
基本思路:
每行比上行多一个元素。
每行第一列和...
分类:
其他好文 时间:
2015-05-17 15:18:43
阅读次数:
121
Problem D
Morley’s Theorem
Input: Standard Input
Output: Standard Output
Morley’s theorem states that that the lines trisecting the angles of an arbitrary plane triangle meet at the vertices of a...
分类:
其他好文 时间:
2015-05-16 18:25:36
阅读次数:
124
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...
分类:
其他好文 时间:
2015-05-16 06:45:28
阅读次数:
126
1 class Solution { 2 public: 3 int minimumTotal(vector > &triangle) { 4 vector> temp(triangle); 5 vector>::size_type length=temp....
分类:
其他好文 时间:
2015-05-15 22:41:34
阅读次数:
146