Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant dig...
分类:
其他好文 时间:
2014-07-18 16:17:10
阅读次数:
249
Smith Numbers
Background
While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University , noticed that the telephone number of his brother-in-law H. Smith had ...
分类:
其他好文 时间:
2014-07-18 13:28:06
阅读次数:
234
Dropping BallsA number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first v....
分类:
其他好文 时间:
2014-07-18 12:14:24
阅读次数:
202
这一讲我们集中讲解类和他的一些特性.首先我们从自定义一个有理数类来开始.
在C语言中有一个关键字: struct ,用来创建一个结构体类型.但是在C++中这个关键的含义就不仅仅如此了,下面我们可以看下示例:
/// Represent a rational number.
struct rational
{
int numerator; ///< numerator gets th...
分类:
编程语言 时间:
2014-07-18 11:31:36
阅读次数:
422
写这个就是为了手写一份好用的求割点模板:
吐槽下,题目中的 Each of the next at most N lines contains the number of a place followed by the numbers of some places to which there is a direct line from this place. 这个at most是不可信的,应...
分类:
其他好文 时间:
2014-07-18 11:29:34
阅读次数:
232
Given a binary tree containing digits from 0-9 only,
each root-to-leaf path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents
the number 123.
Find the to...
分类:
其他好文 时间:
2014-07-18 11:13:57
阅读次数:
204
function is_number(field,div_id)//div_id是显示错误的div的ID{ var patt=new RegExp("^[0-9]{1,2}$");//建立正则表达式对象patt with(field){ if(patt.test(value)==false){//....
分类:
Web程序 时间:
2014-07-18 10:30:53
阅读次数:
224
Double HappinessOn the math lesson a teacher asked each pupil to come up with his own lucky numbers. As a fan of number theory Peter chose prime numbe...
分类:
移动开发 时间:
2014-07-18 00:12:12
阅读次数:
616
使用ROW_NUMBER来分页几乎是家喻户晓的东东了,而且这东西简单易用,简直就是程序员居家必备之杀器,然而ROW_NUMBER也不是一招吃遍天下鲜的无敌BUG般存在,最近就遇到几个小问题,拿出来供大家娱乐下。---==========================================...
分类:
其他好文 时间:
2014-07-18 00:02:19
阅读次数:
332
与java不一样,因为js是弱语言0<15 返回布尔类型 true,表达式变成true<30,js 有默认类型转换机制,表达式true<30 中的true会 转换成number类型 1,从而变成1< 30,就得到true;总结:一般不要适应,if(0<15<30)这种,一般用&& 或者 || ;js...
分类:
Web程序 时间:
2014-07-17 22:35:03
阅读次数:
266