(1) _stdcall调用 _stdcall是Pascal程序的缺省调用方式,参数采用从右到左的压栈方式,被调函数自身在返回前清空堆栈。 WIN32 Api都采用_stdcall调用方式,这样的宏定义说明了问题: #define WINAPI _stdcall 按C编译方式,_stdcal...
分类:
其他好文 时间:
2015-04-13 14:22:07
阅读次数:
95
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]...
分类:
其他好文 时间:
2015-04-13 12:26:38
阅读次数:
121
Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(...
分类:
其他好文 时间:
2015-04-13 12:20:33
阅读次数:
101
题目如下:
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-04-12 16:16:46
阅读次数:
105
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]...
分类:
其他好文 时间:
2015-04-10 20:00:18
阅读次数:
114
题目:
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]
]
思路:第n层有n个数,而且第n...
分类:
其他好文 时间:
2015-04-09 10:35:44
阅读次数:
105
题目:
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-04-09 10:33:09
阅读次数:
143
标识符命名法
标识符命名法最要有四种:
1 驼峰(Camel)命名法:又称小驼峰命名法,除首单词外,其余所有单词的第一个字母大写。
2 帕斯卡(pascal)命名法:又称大驼峰命名法,所有单词的第一个字母大写
3 下划线命名法:单词与单词间用下划线做间隔。
4 匈牙利命名法:广泛应用于微软编程环境中,在以Pascal命名法的变量前附加小写序列说明该变量的类型。 量的取名方...
分类:
移动开发 时间:
2015-04-03 15:22:29
阅读次数:
199
每个程序都是纯读入与1个输出.输入数据分别有1e2,1e3,1e4,1e5,1e6,1e7个数.C++使用getchar()读入是最快的.流输入是非常非常慢! 比赛还是用gechar比较好...
分类:
其他好文 时间:
2015-04-02 23:48:45
阅读次数:
410
原文链接:http://www.cnblogs.com/sober/archive/2009/09/01/1558178.html我觉得评论里面有几句比较有价值:不用它们也是没问题的,除非你用C++做的DLL要导出,并提供给Pascal,c调用另外、这属于调用约定,主要是不同调用约定产生的目标机器码...
分类:
其他好文 时间:
2015-04-02 20:46:05
阅读次数:
113