[leetcode]Pascal's Triangle...
分类:
其他好文 时间:
2014-09-09 12:39:28
阅读次数:
191
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-09-06 17:20:33
阅读次数:
229
就是给一个三角形,然后给出一些关系,以及一些点的坐标,最后求一个三角形面积就好了。
我的做法:
用向量的方法推出离线段一个端点最近的三等分点的表达式
用行列式解线性方程推出求两直线交点的表达式
用叉积求三角形面积
用小数点后第一位对整数部分进行四舍五入求得离这个实数最近的整数
我的代码如下:
#include
#include
#include
#incl...
分类:
其他好文 时间:
2014-09-06 12:31:13
阅读次数:
228
題目:打印Pascal三角到第一个到达10^60的行。
分析:字符串、大整數、模擬。f(i,j)= f(i-1,j-1)+ f(i-1,j) {組合數公式}。
說明:注意不小于10^60的數字有61位(⊙_⊙)。
#include
#include
#include
using namespace std;
int P[220][220][70] = {0};
int main(...
分类:
其他好文 时间:
2014-09-06 10:59:33
阅读次数:
155
我们的网页因为 CSS 而呈现千变万化的风格。这一看似简单的样式语言在使用中非常灵活,只要你发挥创意就能实现很多比人想象不到的效果。特别是随着 CSS3 的广泛使用,更多新奇的 CSS 作品涌现出来。今天给大家带来 CSS 三角形绘制方法复制代码 代码如下:#triangle-up {width: ...
分类:
Web程序 时间:
2014-09-04 14:40:49
阅读次数:
173
The Triangle
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 37778
Accepted: 22685
Description
7
3 8
8 1 0
2 7 4 4
4 5 2 6 5
(Figure...
分类:
其他好文 时间:
2014-09-03 21:19:27
阅读次数:
210
Pascal's TriangleGivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,...
分类:
其他好文 时间:
2014-09-03 16:46:16
阅读次数:
183
运用PHP面向对象的知识设计一个图形计算器,同时也运用到了抽象类知识,这个计算器可以计算三角形的周长和面积以及矩形的周长和面积。本图形计算器有4个页面:1.PHP图形计算器主页index.php; 2.形状的抽象类shape.class.php; 3三角形计算类triangle.clas...
分类:
Web程序 时间:
2014-09-02 00:04:03
阅读次数:
571
问题描述
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]
]
...
分类:
其他好文 时间:
2014-09-01 17:48:03
阅读次数:
158