按自己的方式出错使用raise语句引发一个异常,可以使用一个类(应该是Exception的子类)或者实例参数来作为raise的引发对象。使用类时,程序会自动创建实例,如>>> raise Exception('hyperdrive overload')Traceback (most recent c...
分类:
编程语言 时间:
2015-03-09 12:27:52
阅读次数:
154
给你n个杯子,每次有特定的到水规则,倒m次请问最后每个被子里还有多少水我们很容易发现每次变化的规则相同,那么可以set 一个矩阵存放然后多次倒水就相当于矩阵相乘,在m 范围达到(1#include #include #include #include #include #include #inclu...
分类:
其他好文 时间:
2015-03-08 21:30:13
阅读次数:
148
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any...
分类:
其他好文 时间:
2015-03-08 21:23:08
阅读次数:
173
Plus One问题:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant ...
分类:
其他好文 时间:
2015-03-08 21:22:25
阅读次数:
123
Container With Most Water问题:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn suc...
分类:
其他好文 时间:
2015-03-08 19:58:18
阅读次数:
123
For almost 26 years, even a trivial boy like me, have made over 100 and listened uncountable speeches, most of which are boring and tedious. Some pro....
分类:
其他好文 时间:
2015-03-08 11:44:24
阅读次数:
153
import sklearn报错:Traceback (most recent call last): File "", line 1, in import sklearn File "D:\Python27\lib\site-packages\scikit_learn-0.15.2-py...
分类:
其他好文 时间:
2015-03-08 06:43:24
阅读次数:
1454
还是水题,算出N!结尾0的个数,算出约数5,25,125.。。的个数和即可FactorialTime Limit: 1500MSMemory Limit: 65536KTotal Submissions: 14736Accepted: 9120DescriptionThe most importan...
分类:
其他好文 时间:
2015-03-07 21:19:47
阅读次数:
129
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:
其他好文 时间:
2015-03-07 16:58:09
阅读次数:
131
As most of the ACMers, wy's next target is algorithms, too. wy is clever, so he can learn most of the algorithms quickly. After a short time, he has l...
分类:
编程语言 时间:
2015-03-07 11:26:39
阅读次数:
195