package com.my.demo; import java.util.Scanner; public class Triangle { public static void main(String[] args) { System.out.println("请输入三个正整数:"); Scann... ...
分类:
其他好文 时间:
2019-04-28 18:41:53
阅读次数:
285
1,Triangle 1 int mininumTotal(vector<vector<int>>& triangle) { 2 for (int i = triangle.size() - 2; i >= 0; --i) { 3 for (int j = 0; j < i + 1; ++j) { ...
分类:
其他好文 时间:
2019-04-21 20:19:04
阅读次数:
190
H - 三角形 4.1 Description A lattice point is an ordered pair (x,y) where x and y are both integers. Given the coordinates of the vertices of a triangle( ...
分类:
其他好文 时间:
2019-04-16 01:34:05
阅读次数:
193
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 fo ...
分类:
其他好文 时间:
2019-04-15 16:33:21
阅读次数:
147
(1)定义一个形状类(Shape)方法:计算周长,计算面积子类:矩形类(Rectangle) :额外的方法:differ() 计算长宽差圆形类(Circle)三角形类(Triangle)正方形类(Square) 矩形的子类生成几个不同的形状对象,放在一个Shape类型的数组里,分别求每个形状的周长和 ...
分类:
其他好文 时间:
2019-04-11 16:31:56
阅读次数:
134
projectMarch 14, 20191 MTH5001: Introduction to Computer Programming 2018/191.1 Final Report Project: "Networks"1.1.1 Instructions:First, please type ...
分类:
其他好文 时间:
2019-04-07 19:20:52
阅读次数:
161
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 fo ...
分类:
其他好文 时间:
2019-04-02 16:51:36
阅读次数:
145
链接:https://vjudge.net/problem/POJ-1163 题意: 给一个三角形,每次只能从点往下一层左边或者右边走。 求走到最下面一层能得到的最大值。 思路: dp,每个位置是上方左右中较大的值加上自己。 代码: ...
分类:
其他好文 时间:
2019-04-01 01:10:49
阅读次数:
132
题目链接 http://acm.sdibt.edu.cn/vjudge/ojFiles/uvalive/pdf/61/6177.pdf 题意是 给定一个数n,代表着一共有n个人,且他们的身高从1到n。 要求让这n个人站成一行,使得身高的排列呈波浪形,比如低高低或者高低高。 注意:n = 1 , an ...
分类:
其他好文 时间:
2019-03-30 10:20:57
阅读次数:
159
Pascal's triangle (1过) Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return 给定一个非负整数 numRows,生成杨辉三角的 ...
分类:
其他好文 时间:
2019-03-20 19:11:27
阅读次数:
203