码迷,mamicode.com
首页 >  
搜索关键字:triangle    ( 1341个结果
CodeForces 407A Triangle
首先要求在平面内找到一个直角三角形,两个边长分别为a,b,并且三条边都不得与二维坐标轴的 平行,且点都在整数点上,首先这个三角形若是存在的话,那么它肯定可以在这个平面上平移的,那么我们把它给移到一二象限,然后一个点固定在(0,0)点,这样另外两个点看一下 a,b,的范围,那么另外两个点无非在 一二两个象限内以(0,0)为端点的 边长为1000的正方形内,在这两个正方形内 枚举出所有符合的点,分在两...
分类:其他好文   时间:2014-10-30 17:10:56    阅读次数:205
The Triangle
The Triangle 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描述 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program that calculates the highest sum of ...
分类:其他好文   时间:2014-10-29 21:37:14    阅读次数:213
[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 fol...
分类:其他好文   时间:2014-10-29 14:36:46    阅读次数:217
UVa 11437 (梅涅劳斯定理) Triangle Fun
题意:给出三角形ABC顶点的坐标,DEF分别是三边的三等分点。求交点所形成的三角形PQR的面积。分析:根据梅涅劳斯定理,我们得到:,解得 另外还有:,解得 所以AR : RP : PD = 3 : 3 : 1同理,BE和CF也被分成这样比例的三段。△ADC = (2/3)△ABC△CDR = (4/...
分类:其他好文   时间:2014-10-28 11:47:15    阅读次数:180
POJ 1163 The Triangle(经典问题教你彻底理解动归思想)
The Triangle Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 38195   Accepted: 22946 Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figu...
分类:其他好文   时间:2014-10-27 19:37:23    阅读次数:189
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 use...
分类:其他好文   时间:2014-10-27 17:33:44    阅读次数:223
Triangle LeetCode |My solution
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], ...
分类:其他好文   时间:2014-10-27 15:36:28    阅读次数:190
[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 use only O(k) extra space? 思路: ...
分类:其他好文   时间:2014-10-26 11:46:08    阅读次数:251
[leetcode]Pascal's Triangle
问题描述: 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] ] import java.util.Arr...
分类:其他好文   时间:2014-10-25 21:28:57    阅读次数:205
leetcode:pascal's_triangle_II
这道题跟Pascal's Triangle很类似,只是这里只需要求出某一行的结果。...
分类:其他好文   时间:2014-10-24 19:01:21    阅读次数:233
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!