题目大意: Nasa应邻居们的要求,决定用一个网络把大家链接在一起。给出v个点,e条可行路线,每条路线分别是x连接到y需要花费w。 1:如果不存在最小生成树,输出“No way”. 2:如果不存在次小生成树,输出“No second way”. 3:如果两者都存在,输出次小生成树的长度.解题...
分类:
其他好文 时间:
2015-06-09 16:46:34
阅读次数:
187
pair类型在utility头文件中定义, 包含两个数据值, pair类的成员都是公有的, 这两个成员分别命名为first 和 second.可以直接用p.first或p.second的方式访问其数据成员, 在创建pair对象时, 必须提供两个类型名: pair对象所包含的两个数据成员各自对应的类型名字, 这两个类型不必相同.
pair p1; 创建一个空的pair对象, 这两...
分类:
编程语言 时间:
2015-06-08 19:40:23
阅读次数:
186
1224. Spiral
Time limit: 1.0 second
Memory limit: 64 MB
A brand new sapper robot is able to neutralize mines in a rectangular region having integer height and width (N and
M respectively...
分类:
其他好文 时间:
2015-06-07 12:37:35
阅读次数:
164
1457. Heating Main
Time limit: 1.0 second
Memory limit: 64 MB
Background
I like my hometown very much. Those dilapidated buildings rising proudly above the city and streets dug up as far bac...
分类:
其他好文 时间:
2015-06-07 11:09:57
阅读次数:
163
1025. Democracy in Danger
Time limit: 1.0 second
Memory limit: 64 MB
Background
In one of the countries of Caribbean basin all decisions were accepted by the simple majority of votes at th...
分类:
其他好文 时间:
2015-06-07 11:08:28
阅读次数:
116
The idea is to usetwo stacks.Forpush, the first stack records the pushed elements and the second stack recordsallthe minimum (including duplicates) th...
分类:
其他好文 时间:
2015-06-07 06:10:12
阅读次数:
111
枚举、列举和描述\begin{list_type}\item The first item\item The second item\item The third etc \ldots\end{list_type}默认的 list_type 有 enumerate、 itemize 和 descri...
分类:
其他好文 时间:
2015-06-06 00:16:17
阅读次数:
239
<TextView
android:id="@+id/firstview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ff0000"
android:text="第一个Textview"/>
<TextView
android:id="@+id/second"
android:layout_width="wrap_content"
andro..
分类:
移动开发 时间:
2015-06-05 23:01:46
阅读次数:
654
linux命令---查找文件中的内容[yang@localhost ~]$ cat 1.txt |egrep '123456789|second'-------匹配123456789或者second的行first line:12345678901234567890123456789012345678...
分类:
系统相关 时间:
2015-06-03 23:24:46
阅读次数:
173
1.time类保存在“htime.h”中,要求:
⑴
数据成员包含时(hour)、分(minute)、秒(second),为私有成员;
⑵
能给数据成员提供值的成员函数(默认值为0时0分0秒);
⑶
能分别取时、分、秒;
⑷
能输出时、分、秒(用“:”分隔),并显示上午(am)或下午(pm);
⑸
有默认值的构造函数(默认值为0时0分0秒)。
说明:成员函数均定义为公有成员。...
分类:
编程语言 时间:
2015-06-03 17:39:10
阅读次数:
322