文件名称:dist
-
所属分类:
- 标签属性:
- 上传时间:2018-03-10
-
文件大小:3.18mb
-
已下载:21次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
用最短路径算法算出特定两点之间的距离
输入:直接读取net.in文件
第一行为四个整数N,M,S,T,每两个整数之间用一个空格隔开,分别表示网络的节点(编号为1到N),网络线段数,以及起点终点编号
接下来M行,每行三个整数U,V,D,每个整数之间用空格隔开,表示节点U和V之间有一条线路相连,距离是D,(两个节点可能有多条线路)
输出:直接写入到net.out文件,输出只有一行,表示从S点到T点的最短距离(如果不通则输出-1) (N<=100,M<=N*N,D<=1000)(Use the shortest path algorithm to calculate the distance between two specific two points
Input: read the net.in file directly
The first behavior is four integers N, M, S and T. Every two integers are separated by a space, representing the node of the network (number 1 to N), the number of network segments, and the origin and destination number.
Next, M row, each row three integers U, V, D, each integer is separated by spaces, indicating that there is a line between nodes U and V, the distance is D, (there may be multiple lines in two nodes).
Output: write directly to net.out file, output only one line, which indicates the shortest distance from S point to T point (if it doesn't connect, output -1) (N<=100, M<=N*N, D<=1000).
Floyd-Warshall algorithm)
输入:直接读取net.in文件
第一行为四个整数N,M,S,T,每两个整数之间用一个空格隔开,分别表示网络的节点(编号为1到N),网络线段数,以及起点终点编号
接下来M行,每行三个整数U,V,D,每个整数之间用空格隔开,表示节点U和V之间有一条线路相连,距离是D,(两个节点可能有多条线路)
输出:直接写入到net.out文件,输出只有一行,表示从S点到T点的最短距离(如果不通则输出-1) (N<=100,M<=N*N,D<=1000)(Use the shortest path algorithm to calculate the distance between two specific two points
Input: read the net.in file directly
The first behavior is four integers N, M, S and T. Every two integers are separated by a space, representing the node of the network (number 1 to N), the number of network segments, and the origin and destination number.
Next, M row, each row three integers U, V, D, each integer is separated by spaces, indicating that there is a line between nodes U and V, the distance is D, (there may be multiple lines in two nodes).
Output: write directly to net.out file, output only one line, which indicates the shortest distance from S point to T point (if it doesn't connect, output -1) (N<=100, M<=N*N, D<=1000).
Floyd-Warshall algorithm)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
dist\Debug | 0 | 2018-03-08 |
dist\Debug\dist.exe | 96256 | 2018-03-04 |
dist\Debug\dist.ilk | 684444 | 2018-03-04 |
dist\Debug\dist.pdb | 1526784 | 2018-03-04 |
dist\dist.sdf | 8323072 | 2018-03-04 |
dist\dist.sln | 958 | 2018-03-03 |
dist\dist.v12.suo | 20992 | 2018-03-04 |
dist\dist | 0 | 2018-03-08 |
dist\dist\Debug | 0 | 2018-03-08 |
dist\dist\Debug\dist.log | 1444 | 2018-03-04 |
dist\dist\Debug\dist.obj | 252725 | 2018-03-04 |
dist\dist\Debug\dist.tlog | 0 | 2018-03-08 |
dist\dist\Debug\dist.tlog\cl.command.1.tlog | 734 | 2018-03-04 |
dist\dist\Debug\dist.tlog\CL.read.1.tlog | 5648 | 2018-03-04 |
dist\dist\Debug\dist.tlog\CL.write.1.tlog | 540 | 2018-03-04 |
dist\dist\Debug\dist.tlog\dist.lastbuildstate | 180 | 2018-03-04 |
dist\dist\Debug\dist.tlog\link.command.1.tlog | 1344 | 2018-03-04 |
dist\dist\Debug\dist.tlog\link.read.1.tlog | 2624 | 2018-03-04 |
dist\dist\Debug\dist.tlog\link.write.1.tlog | 518 | 2018-03-04 |
dist\dist\Debug\net.in | 85 | 2018-03-03 |
dist\dist\Debug\try.in | 3 | 2018-03-03 |
dist\dist\Debug\vc120.idb | 322560 | 2018-03-04 |
dist\dist\Debug\vc120.pdb | 421888 | 2018-03-04 |
dist\dist\dist.cpp | 2816 | 2018-03-10 |
dist\dist\dist.vcxproj | 4264 | 2018-03-04 |
dist\dist\dist.vcxproj.filters | 945 | 2018-03-03 |
dist\dist\net.in | 85 | 2018-03-03 |
dist\dist\ney.out | 2 | 2018-03-04 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.