码迷,mamicode.com
首页 >  
搜索关键字:pascals triangle pas    ( 2128个结果
二分匹配 二分+网络流 未完成
奶牛分配(stall4.pas/in.out)描述农夫约翰上个星期刚刚建好了他的新牛棚,他使用了最新的挤奶技术。不幸的是,由于工程问题,每个牛栏都不一样。第一个星期,农夫约翰随便地让奶牛们进入牛栏,但是问题很快地显露出来:每头奶牛都只愿意在她们喜欢的那些牛栏中产奶。上个星期,农夫约翰刚刚收集到了奶牛...
分类:其他好文   时间:2014-10-29 18:53:59    阅读次数:180
[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
delphi.数据结构.链表
链表作为一种基础的数据结构,用途甚广,估计大家都用过。链表有几种,常用的是:单链表及双链表,还有N链表,本文着重单/双链表,至于N链表。。。不经常用,没法说出一二三来。在D里面,可能会用Contnrs.pas.TStack/TQueue相关类,进行操作,不过里面的实现,并非使用的是链表实现,只是用T...
分类:Windows程序   时间:2014-10-25 01:56:46    阅读次数:282
leetcode:pascal's_triangle_II
这道题跟Pascal's Triangle很类似,只是这里只需要求出某一行的结果。...
分类:其他好文   时间:2014-10-24 19:01:21    阅读次数:233
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!