- Category:
- Other systems
- Tags:
-
- File Size:
- 3.18mb
- Update:
- 2018-03-10
- Downloads:
- 0 Times
- Uploaded by:
- kelin6
Description: 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
To Search:
File list (Check if you may need any files):
Filename | Size | Date |
---|
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 |