public static void main(String[] args) {
// 二维数组每一行分别是 A、B、C、D、E 各点到其余点的距离,
// A -> A 距离为0, 常量M 为正无穷
int[][] weight1 = {
{0,4,M,2,M},
{4,0,4,1,M},
{M,4,0,1,3},
{2,1,1,0,7},
{M,M,3,7,0}
};
int start = 0; public static void main(String[] args) {
// 二维数组每一行分别是 A、B、C、D、E 各点到其余点的距离,
// A -> A 距离为0, 常量M 为正无穷
int[][] weight1 = {
{0,4,M,2,M},
{4,0,4,1,M},
{M,4,0,1,3},
{2,1,1,0,7},
{M,M,3,7,0}
};
int start = 0; public static void main(String[] args) {
// 二维数组每一行分别是 A、B、C、D、E 各点到其余点的距离,
// A -> A 距离为0, 常量M 为正无穷
int[][] weight1 = {
{0,4,M,2,M},
{4,0,4,1,M},
{M,4,0,1,3},
{2,1,1,0,7},
{M,M,3,7,0}
};
int start = 0; |