#-*- coding:UTF-8 -*-#-*- author:Zahoor Wang
-*-import codecs, os, sys, platform, stringdef env():return platform.system()def
read_file(uri, charset =...
分类:
编程语言 时间:
2014-05-16 04:30:50
阅读次数:
306
第四道树题,逐渐能写递归了。虽然最后AC的代码还是看了网络,但是距离成功攻克此类问题仅一步之遥。题目:一棵树,判断是否为AVL。(AVL条件:树上任意一点的左右子树的高度差_
1 ) return false; else return isBalanced(root.lef...
分类:
其他好文 时间:
2014-05-16 04:04:41
阅读次数:
259
d[n]=min(dp[n-1]+1,dp[n、2]); n为偶数
dp[n]=dp[n-1]+1; 答案为18 怎么通过计算求得答案? #includeusing namespace std;int d[2014];int
min(int x,int y){ if(x>y) return y; e...
分类:
其他好文 时间:
2014-05-15 21:05:33
阅读次数:
387
A linked list is given such that each node
contains an additional random pointer which could point to any node in the list
or null.Return a deep copy ...
分类:
其他好文 时间:
2014-05-15 21:00:06
阅读次数:
325
在插件的源代码里插入如下代码:(function(jQuery){if(jQuery.browser)
return;jQuery.browser = {};jQuery.browser.mozilla = false;jQuery.browser.webkit
= false;jQuery.bro...
分类:
Web程序 时间:
2014-05-15 20:58:51
阅读次数:
535
internal static TResult ExecuteSingle(IEnumerable
query, Expression queryRoot) { return GetElementFunction(queryRoot)(query)...
分类:
其他好文 时间:
2014-05-15 20:54:39
阅读次数:
283
看这个代码:
public class D
{
@Override
public String toString()
{
return "obj:"+this;
}
public static void main(String[] args)
{
System.out.println(new D());
}...
分类:
其他好文 时间:
2014-05-15 20:18:38
阅读次数:
277
Document
function validate() {
if(loginform.username.value == ""){
alert("账号不能为空!");
return;
}
if(loginform.password.value == ""){
alert("密码不能为空!");
return;
}
loginform.submit...
分类:
Web程序 时间:
2014-05-15 18:39:01
阅读次数:
501
Given two binary strings, return their sum
(also a binary string).For example, a = "11" b = "1" Return "100".string
的操作,短string补位。两个“0”会输出一个“00”,要特殊处理...
分类:
其他好文 时间:
2014-05-15 17:47:57
阅读次数:
283
PHP生成指定大小随机图片 $image_width){ for ($i=$start;
$i<$image_height * 2; $i+=$step) { imageline($img, 0, $i, $i, 0,
$color); }}else{ for ($i=$start; $i<$im....
分类:
Web程序 时间:
2014-05-15 17:42:03
阅读次数:
377