本文原题: LeetCode.给定 n, 求解独特二叉搜寻树 (binary search trees) 的个数.什么是二叉搜寻树?二叉查找树(Binary Search Tree),或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值; 若它的...
分类:
其他好文 时间:
2014-07-19 21:34:00
阅读次数:
292
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址。type: 要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和delete也可以使用,但仅部分浏览器支持。timeout: 要求为Number类型的参数,设置请求超...
分类:
Web程序 时间:
2014-07-19 21:31:01
阅读次数:
224
软件名称:爱博邮件群发系统专业版Version 10.5.2Build 429破解版(此软件上一个版本小众论坛发布过破解版,大家对这个软件的反响都比较好,但是上一个版本的破解依然是存在问题,发送20封邮件会自动停止。这一次新版的破解已经更新此问题。目前算是比较完美的破解了,小瑕疵是不能批量导入发送帐...
分类:
其他好文 时间:
2014-07-19 21:13:15
阅读次数:
205
Bubu's bookshelf is in a mess! Help him!There arenbooks on his bookshelf. We define the mess value to be the number of segments ofconsecutive equal-he...
分类:
其他好文 时间:
2014-07-19 20:36:17
阅读次数:
248
The xlrd ModuleA Python module for extracting data from MS Excel ? spreadsheet files. Version 0.7.3 -- February/March 2012General informationAcknowled...
分类:
其他好文 时间:
2014-07-18 23:38:08
阅读次数:
505
描述、源码、示例
version 1:普通操作版本
version 2: 泛化操作版本
1.accumulate
描述:计算 init 和 [first, last) 内所有元素的总和
源码:
//version 1
template
T accumulate(InputIterator first, InputIterator last, T init) {
for ( ; first != last; ++first)
ini...
分类:
其他好文 时间:
2014-07-18 22:16:32
阅读次数:
283
UVA 1558 - Number Game
题目链接
题意:20之内的数字,每次可以选一个数字,然后它的倍数,还有其他已选数的倍数组合的数都不能再选,谁先不能选数谁就输了,问赢的方法
思路:利用dp记忆化去求解,要输出方案就枚举第一步即可,状态转移过程中,选中一个数字,相应的变化写成一个函数,然后就是普通的博弈问题了,必胜态之后必有必败态,必败态之后全是必胜态
代码:
...
分类:
其他好文 时间:
2014-07-18 21:38:14
阅读次数:
166
1.iter_swap
描述:将两个 ForwardIterator 所指的对象对调
源码:
//version 1
template
inline void __iter_swap(ForwardIterator1 a, ForwardIterator2 b, T*) {
T tmp = *a;
*a = *b;
*b = tmp;
}
//version 2
template...
分类:
其他好文 时间:
2014-07-18 21:32:42
阅读次数:
244
一、扩展函数原型的更好办法://定义下面的通用方法
Function.prototype.method=function(name,func){
this.prototype[name]=func;
returnthis;
};
//使用上面的通用方法作为工具进行扩展,以免每次扩展都访问Function.prototype.XXX(that‘sugly).
Number.method(‘integer‘,fun..
分类:
编程语言 时间:
2014-07-17 09:44:42
阅读次数:
259
There are N integers (1A[j].InputThe first line of the input contains the number N. The second line contains N numbers A1...AN.OutputWrite amount of s...
分类:
其他好文 时间:
2014-07-17 00:24:27
阅读次数:
236