12345678910111213programProject1; {关键字program,标准的Pascal源文件格式}uses{uses单元引用列表}Forms, {Forms窗体单元}Unit1 in'Unit1.pas'{Form1};{$R *.res} {编译器指令,引用项目的资源文件}...
Hello.cfg 項目配置文件Hello.dof 項目選項文件Hello.dpr 項目文件Hello.exe 應用程序Hello.res 資源文件HelloWorld.dcu 窗口編譯文件HelloWorld.dfm 窗體文件HelloWorld.pas 窗體單元文件
单元文件是Pascal源文件,扩展名为.pas。有三种类型的单元文件:窗体/数据模块和框架的单元文件(form/data module and frame units),一般由Delphi自动生成。组件的单元文件(component units),由您或者Delphi生成。通用的单元文件(gener...
题目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]
]思路模拟代码 /**----------------...
分类:
其他好文 时间:
2015-02-06 13:18:04
阅读次数:
132
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?...
分类:
其他好文 时间:
2015-02-06 13:15:11
阅读次数:
218
题目链接:http://poj.org/problem?id=1163
The Triangle
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 39022
Accepted: 23430
Description
7
3 8
8 ...
分类:
其他好文 时间:
2015-02-05 23:29:14
阅读次数:
416
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The f...
分类:
编程语言 时间:
2015-02-05 20:02:02
阅读次数:
181
??
这道练习的翻译有误。原文是:Write a procedure that computes elements of Pascal’s triangle bymeans of a recursive process.正确的翻译应该是计算帕斯卡三角形的各个元素。
y :
0 1
1 1
1
2 1
2 1
3 1
...
分类:
其他好文 时间:
2015-02-05 16:24:31
阅读次数:
138
最近做一个小程序没有固定的主窗体,流程随机性比较大所以找寻相应的方案解决方法如下 1 program Project1; 2 3 uses 4 Forms, 5 Unit1 in 'Unit1.pas' {Form1}, 6 Unit2 in 'Unit2.pas' {Form2}; ...
题意:给了这样一张图 有两种状态:pushed(*)和unpushed(.) 为方便起见分别成为 开 和 关改变一个点的开关状态 会同时改变与它相邻的点的开关状态 比如改变5,则2、3、4、6、8、9都会改变N(行数)最多为6 即 最多21个点求: 任意改变开关状态后 最多能有几个关着。为什么这么....
分类:
其他好文 时间:
2015-02-04 20:12:57
阅读次数:
163