题目大意:给你N个点(编号为0~N-1),M条路,问最小生成树是多少,如果不能生成最
小生成树,则输出impossible
思路:用Kruskal来做,如果最后得不到N-1条路,就输出impossible,否则就输出结果。...
分类:
其他好文 时间:
2015-01-19 23:38:08
阅读次数:
409
Design and implement a TwoSum class. It should support the following operations:addandfind.add- Add the number to an internal data structure.find- Fin...
分类:
其他好文 时间:
2015-01-19 15:39:47
阅读次数:
195
Marriage Match III
Time Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1491 Accepted Submission(s): 440
Problem Description
Presumably,...
分类:
其他好文 时间:
2015-01-19 14:33:23
阅读次数:
112
Question:Givennsetsofchoices:(1,2,3),(a,b,c),(i,ii,iii).Youpickoneelementfromeachsetofchoices.Generateallpossiblepickings.http://www.glassdoor.com/Interview/Given-n-sets-of-choices-1-2-3-2-3-4-4-5-You-pick-one-element-from-each-set-of-choices-Generate-all-p..
分类:
其他好文 时间:
2015-01-16 08:46:43
阅读次数:
194
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
题目的意思是将给定的罗马数字转换为一个整数
什么是罗马数字:
I, II, III, IV, V, VI, VII, VIII, IX, X....
分类:
其他好文 时间:
2015-01-15 20:19:12
阅读次数:
205
java的打包jar,war,ear包的作用,区别,打包方式.a) 作用与区别i.jar: 通常是开发时要引用通用(JAVA)类,打成包便于存放管理ii.war: 是做好一个(web)应用后,通常是网站,打成包部署到容器中iii.ear: 企业级应用,实际上EAR包中包含WAR包和几个企业级项目的配...
分类:
编程语言 时间:
2015-01-15 17:52:11
阅读次数:
200
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
将罗马数字转为阿拉伯数字 对应转换表如下:
个位数举例
I, 1 】II, 2】 III, 3】 IV, 4 】V, 5 】VI, 6】 VII, 7】 VIII,8 】IX,...
分类:
编程语言 时间:
2015-01-15 16:08:07
阅读次数:
188
Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ Ⅹ简单的罗马数字见下: I - 1 II - 2 III - 3 IV - 4 V - 5 VI - 6 X - 10 L - 50 C - 100 D - 500 M - 1000 罗马数字共同拥有七个,即I(1),V(5),X(10),L(50),C(100)...
分类:
其他好文 时间:
2015-01-13 21:32:11
阅读次数:
231
Earlier articles in this series:Part I: IdempotencePart II: ImmutabilityPart III: VolatilityPart IV: SingletonsOh, hell, this article just had to be a...
分类:
系统相关 时间:
2015-01-07 16:42:43
阅读次数:
423
万事皆有始亦有终——《The Matrix》影评之终结篇 一、前言 从 Matrix I 到 Matrix III,整整四年,一对名叫沃卓斯基(导演加编剧)的兄弟给科幻电影带来一次史无前例的冲击,无论从思想上还是视觉效果上都超过了以往任何一部科幻电影,从来没有一部科幻电影能够创造这么多的 F...
分类:
其他好文 时间:
2015-01-06 21:31:16
阅读次数:
288