示例无向图如下:(起始点为v0) 邻接矩阵为: 注意:其中没有连接的边和自己到自己的点权值用10000表示. 代码: static void Main(string[] args) { , , , , , }, { , , , , , }, { , , , , , }, { , , , , , }, { , , , , , }, { , , , , , } }; int n = 6; int[] S = new int[n]; //最短路径的顶点集合 string[] mid = new str