文件名称:fujiati
-
所属分类:
- 标签属性:
- 上传时间:2017-12-18
-
文件大小:862kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
输入
数据少于10组,保证只有一个源点和汇点。输入一个顶点数n(2<=n<=10000),边数m(1<=m <=50000)。接下来m行输入边,分别是边起点sv,边终点ev,边权值w(1<=sv,ev<=n,sv != ev,1<=w <=20)。数据保证图连通。
输出
关键路径的权值和,并且从源点输出关键路径上的路径(如果有多条,请输出字典序最小的)
输入样例
9 11
1 2 6
1 3 4
1 4 5
2 5 1
3 5 1
4 6 2
5 7 9
5 8 7
6 8 4
8 9 4
7 9 2
输出样例
18
1 2
2 5
5 7
7 9(input
The data is less than 10 groups, ensuring only one source and a sink. Input a number of vertices n (2<=n<=10000), the number of edges m (1<=m <=50000). Next, the M line is the input side, which is the edge starting point SV, the edge point EV, and the edge weight W (1<=sv, ev<=n, SV! = EV, 1<=w <=20). The data ensures that the graph is connected.
output
The weight of the key path and the path of the key path from the source point (if there are many, please output the smallest dictionary order)
sample input
9 1 1
1 2 6
1 3 4
1 4 5
2 5 1
3 5 1
4 6 2
5 7 9
5 8 7
6 8 4
8 9 4
7 9 2
sample output
18
12
25
57
79)
数据少于10组,保证只有一个源点和汇点。输入一个顶点数n(2<=n<=10000),边数m(1<=m <=50000)。接下来m行输入边,分别是边起点sv,边终点ev,边权值w(1<=sv,ev<=n,sv != ev,1<=w <=20)。数据保证图连通。
输出
关键路径的权值和,并且从源点输出关键路径上的路径(如果有多条,请输出字典序最小的)
输入样例
9 11
1 2 6
1 3 4
1 4 5
2 5 1
3 5 1
4 6 2
5 7 9
5 8 7
6 8 4
8 9 4
7 9 2
输出样例
18
1 2
2 5
5 7
7 9(input
The data is less than 10 groups, ensuring only one source and a sink. Input a number of vertices n (2<=n<=10000), the number of edges m (1<=m <=50000). Next, the M line is the input side, which is the edge starting point SV, the edge point EV, and the edge weight W (1<=sv, ev<=n, SV! = EV, 1<=w <=20). The data ensures that the graph is connected.
output
The weight of the key path and the path of the key path from the source point (if there are many, please output the smallest dictionary order)
sample input
9 1 1
1 2 6
1 3 4
1 4 5
2 5 1
3 5 1
4 6 2
5 7 9
5 8 7
6 8 4
8 9 4
7 9 2
sample output
18
12
25
57
79)
相关搜索: 数据结构上机
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
附加题 | ||
附加题\fujiati | ||
附加题\fujiati\Debug | ||
附加题\fujiati\Debug\fujiati.exe | 237620 | 2017-12-14 |
附加题\fujiati\Debug\fujiati.ilk | 362924 | 2017-12-14 |
附加题\fujiati\Debug\fujiati.obj | 43007 | 2017-12-14 |
附加题\fujiati\Debug\fujiati.pch | 1985140 | 2017-12-14 |
附加题\fujiati\Debug\fujiati.pdb | 1098752 | 2017-12-14 |
附加题\fujiati\Debug\vc60.idb | 99328 | 2017-12-14 |
附加题\fujiati\Debug\vc60.pdb | 135168 | 2017-12-14 |
附加题\fujiati\fujiati.cpp | 2052 | 2017-12-14 |
附加题\fujiati\fujiati.dsp | 4296 | 2017-12-14 |
附加题\fujiati\fujiati.plg | 901 | 2017-12-14 |
附加题\附加题.dsw | 530 | 2017-12-14 |
附加题\附加题.ncb | 33792 | 2017-12-14 |
附加题\附加题.opt | 48640 | 2017-12-14 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.