Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads WEB Code JSP/Java

Shortest_path

  • Category : JSP/Java
  • Tags :
  • Update : 2012-11-26
  • Size : 1kb
  • Downloaded :0次
  • Author :yag****
  • About : Nobody
  • PS : If download it fails, try it again. Download again for free!
Download1 Download2
Don't use download software fo downloading.
If download fail,Try it again for free.
Introduction - If you have any usage issues, please Google them yourself
描述: 给定一个带权有向图 G=(V,E) ,其中每条边的权是一个整数。另外,还给定 V 中的一个顶点,称为源。现在我们要计算从源到所有其他各顶点的最短路径长度。这里的长度是指路上各边权之和。这个问题通常称为单源最短路径问题。 输入: 第一行为一个整数n,表示包含源在内的顶点的个数,接下来是一个n*n的矩阵,矩阵中-1表示此路不通,否则表示从该顶点到另一顶点的距离。例如对于上图所示的问题我们可以按输入样例中的方式输入。 输出: 输出为一行共n-1个数,按序输出从一号(源)顶点到其它各顶点的最短路径。 输入样例: 5 -1 10-1 30 100 -1-1 50-1-1 -1-1-1-1 10 -1-1 20-1 60 -1-1-1-1-1 输出样例: 10 50 30 60
Packet file list
(Preview for download)
Shortest_path.java
Related instructions
  • We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
  • The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
  • Please use Winrar for decompression tools
  • If download fail, Try it againg or Feedback to us.
  • If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
  • Before downloading, you can inquire through the uploaded person information

Nothing.

Post Comment
*Quick comment Recommend Not bad Password Unclear description Not source
Lost files Unable to decompress Bad
*Content :
*Captcha :
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.