原题地址:http://oj.leetcode.com/problems/sum-root-to-leaf-numbers/题意:Given
a binary tree containing digits from0-9only, each root-to-leaf path could
repre...
分类:
编程语言 时间:
2014-05-12 01:28:30
阅读次数:
440
题目描述N cities are connected by a network of M
one-way roads. It is known that these roads do not cross outside the cities. The
numeration of the cities...
分类:
其他好文 时间:
2014-05-12 01:13:06
阅读次数:
345
产生原因:误将/home/user目录的用户变成了root,所以无法更新ICE导致开机警告解决方法:1.使用guest登录2.打开一个console3.Ctrl
+ Alt +F1 进入安全模式4.使用你的用户名登录5.sudo chown -R user:user/home/$user/.ICEa...
分类:
其他好文 时间:
2014-05-12 00:15:41
阅读次数:
459
静态方法独立于类和类的实例,它是定义在类作用域内的方法。可以由类和实例直接调用。
类方法和静态方法都要使用装饰器来定义,定义的基本格式是:
@staticmethod
def ():
#do something
类方法定义的基本格式是:
@ classmethod
def (cls):
#dosomething
类方法与成员方法不同的是,它需...
分类:
编程语言 时间:
2014-05-11 22:25:53
阅读次数:
422
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151
For each list of words, output a line with each word reversed without changing the order of the words.
This problem contains multi...
分类:
其他好文 时间:
2014-05-11 22:20:43
阅读次数:
443
题意:
给定2个操作
0、把区间的每个数sqrt
2、求和
因为每个数的sqrt次数很少,所以直接更新到底,用个标记表示是否更新完全(即区间内的数字只有0,1就不用再更新了)
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define N 1000...
分类:
其他好文 时间:
2014-05-11 21:02:45
阅读次数:
325
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2724
Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something h...
Given a set ofnon-overlappingintervals, insert
a new interval into the intervals (merge if necessary).You may assume that the
intervals were initially...
分类:
其他好文 时间:
2014-05-11 16:35:35
阅读次数:
224
Reverse a linked list from positionmton. Do it
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m=
2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-05-11 16:03:43
阅读次数:
327
Given an array of words and a length L, format
the text such that each line has exactly L characters and is fully (left and
right) justified.You shoul...
分类:
其他好文 时间:
2014-05-11 15:15:29
阅读次数:
287