链接据说这题是垂心。。数学太弱没有看出来,写了分朴实无华的代码。。旋转三边得到图中的外顶点,然后连接三角形顶点求交点,交上WA。。觉得没什么错误就去看了下discuss,发现都在说精度问题,果断开始水,最后+了epsAC了。。 1 #include 2 #include 3 #include...
分类:
其他好文 时间:
2014-07-18 23:18:12
阅读次数:
302
This is the same asSPOJ #453. The best way to understand DP1A code:class Solution {public: int minimumTotal(vector > &triangle) { fo...
分类:
其他好文 时间:
2014-07-18 21:19:47
阅读次数:
234
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-07-17 14:03:41
阅读次数:
293
在StackOverflow上有这么一个问题,有位同学在http://css-tricks.com/examples/ShapesOfCSS/找到一些使用CSS做的形状,其中一位同学对下面的这个形状充满了疑问。形状是:代码是:#triangle-up {width: 0;height: 0;bord...
分类:
Web程序 时间:
2014-07-16 17:42:09
阅读次数:
213
Chef and The Right TrianglesThe Chef is given a list ofN triangles. Each triangle is identfied by the coordinates of its three corners in the 2-D cart...
分类:
其他好文 时间:
2014-07-14 00:51:29
阅读次数:
198
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-07-13 16:01:42
阅读次数:
209
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?
原题链接:https:/...
分类:
其他好文 时间:
2014-07-12 20:43:11
阅读次数:
213
poj1163The Triangle(简单DP)...
分类:
其他好文 时间:
2014-07-12 19:45:10
阅读次数:
168
GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]...
分类:
其他好文 时间:
2014-07-12 00:17:08
阅读次数:
226
Cake
Time Limit: 1 Second
Memory Limit: 32768 KB
You want to hold a party. Here's a polygon-shaped cake on the table. You'd like to cut the cake into several triangle-shaped parts for th...
分类:
其他好文 时间:
2014-07-08 15:36:15
阅读次数:
298