On a horizontal line, there are two vertical pillars. The distance between their bottoms is w. The height of the first pillar is an integer, chosen uniformly at random in the range 1 through x, inclusive. The h...
分类:
其他好文 时间:
2015-03-04 06:16:07
阅读次数:
157
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key ...
分类:
其他好文 时间:
2015-03-04 06:12:50
阅读次数:
170
Number SequenceTimeLimit:2000MSMemoryLimit:65536KB64bitIOFormat:%I64d&%I64uProblem DescriptionThere is a special number sequence which has n+1 integer...
分类:
编程语言 时间:
2015-03-03 23:24:21
阅读次数:
195
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); Calendar calendar = Calendar.getInstance(); calendar.set(Integer.valueOf(2...
分类:
其他好文 时间:
2015-03-03 18:20:42
阅读次数:
130
//判断是否是数字functionIsNumeric(sDestStr:string):Boolean;//简写多余汉字functionSimplifyWord(sWord:string;iMaxLen:Integer):string;//读写取注册表中的字符串值functionReadRegStr...
分类:
其他好文 时间:
2015-03-03 17:59:30
阅读次数:
212
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
这个题目首先要了解罗马数字的拼写规则(以下引自维基百科):罗马数字共有7个,即I(1)、V(5)、X(10)、L(50)、C(100)、D(500)和M(1000)。按照下述的规则...
分类:
其他好文 时间:
2015-03-03 15:19:41
阅读次数:
206
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
欲了解罗马数字的拼写规则请参考:http://blog.csdn.net/chfe007/article/details/44037079C++代码实现如下: string...
分类:
其他好文 时间:
2015-03-03 15:10:43
阅读次数:
132
In Haskell. Two points: 1. pruning 2. Int suffers from overflow. Integer it is.getPowerSum :: Integer -> [Integer] -> Integer -> IntegergetPowerSum _ ...
分类:
其他好文 时间:
2015-03-03 06:20:33
阅读次数:
128
[LeetCode] 012. Integer to Roman (Medium) (C++/Java/Python)...
分类:
编程语言 时间:
2015-03-02 23:57:24
阅读次数:
298
[LeetCode] 013. Roman to Integer (Easy) (C++/Java/Python)...
分类:
编程语言 时间:
2015-03-02 23:56:14
阅读次数:
183