好吧,基础打好,聊聊decorator,先看这段代码:def SayHi(name): return "How are you {0}, good morning".format(name)def decoator(func): def func_wrapper(name): ...
分类:
编程语言 时间:
2014-12-04 21:32:58
阅读次数:
294
题意:
n(3000)个点m(30000)条边的有向简单图 统计题目中所画的菱形数目
思路:
我们将菱形可以看作a->c点距离为2的两条路 那么假设我们枚举i j两点同时知道i->j距离为2的路径条数 就可以用简单的组合数计算
如果暴力计算路径条数则是n^3的 不过我们可以利用距离为2这个特点 我们同时用邻接表和邻接矩阵存储图 通过邻接表枚举所有边m 这时知道i->k距离为1...
分类:
其他好文 时间:
2014-12-02 22:38:19
阅读次数:
203
A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta...
分类:
其他好文 时间:
2014-12-02 22:05:36
阅读次数:
153
网站出现这样的错误信息:Error Summary:HTTP Error 503.2 - Service UnavailableThe serverRuntime@appConcurrentRequestLimit setting is being exceeded.Detailed Error I...
分类:
其他好文 时间:
2014-12-02 19:11:26
阅读次数:
262
Very quietly I take my leave轻轻的我走了,As quietly as I came here;正如我轻轻的来;Quietly I wave good-bye我轻轻的招手,To the rosy clouds in the western sky.作别西天的云彩。The g...
分类:
其他好文 时间:
2014-12-02 15:11:04
阅读次数:
161
Understanding Joins1.Joins combine tables horizontally (side by side) by combining rows. The tables being joined are not required to have the same num...
分类:
数据库 时间:
2014-12-01 20:49:54
阅读次数:
439
Chapter 1 Good Parts:JavaScript is an important language because it is the language of the web browser.The very good ideas include functions, loose ty...
分类:
编程语言 时间:
2014-12-01 12:39:07
阅读次数:
287
DescriptionThe School №0 of the capital of Berland hasnchildren studying in it. All the children in this school are gifted: some of them are good at p...
分类:
其他好文 时间:
2014-12-01 00:42:32
阅读次数:
273
Improving the quality of the outputThere are a variety of reasons you might not get good quality output from Tesseract. It's important to note that un...
分类:
其他好文 时间:
2014-11-29 20:11:25
阅读次数:
1587
The SEPIC (single-ended, primary-inductance-converter) topology is generally a good choice for voltage regulators that must produce an on output volta...
分类:
其他好文 时间:
2014-11-28 14:22:06
阅读次数:
279