CS3001302 – Homework4 Solved

$ 15.99
Category:

Description

目標
用Bellman-Ford來求得shortest-paths
OJ
Input格式:
Nodenumber;startedvertex;edge,edge,weight;edge,edge,weight;… OJ Input:5;s;s,t,6;s,y,7;t,x,5;t,y,8;t,z,-4;x,t,-2;y,x,-3;y,z,9;z,s,2;z,x,7
OJ
 Output格式:node;node;node;……
distance;distance;distance;…….
 如果為無限,輸出 inf (例如 : 0;8;2;inf;inf)
 OJ Output:S;T;X;Y;Z (按字母順序)
0;6;4;7;2 0;2;4;7;2
0;2;4;7;-2
0;2;4;7;-2
true
OJ
如果有負cycle的話,output的格式將改為下列
OJ Output:S;T;X;Y;Z
0;6;4;7;2
0;6;4;3;2
0;2;4;3;2
0;2;4;-1;-2 false
OJ
題目共10題,每題一分
網址:http://alghw.ddns.net/problems
繳交期限:06/21 23:59
上傳你的code跟一份心得到moodle

Reviews

There are no reviews yet.

Be the first to review “CS3001302 – Homework4 Solved”

Your email address will not be published. Required fields are marked *