1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
| [0, 3, 8, inf, -4] [inf, 0, inf, 1, 7] [inf, 4, 0, inf, inf] [2, inf, -5, 0, inf] [inf, inf, inf, 6, 0] --------- [0, 3, 8, inf, -4] [inf, 0, inf, 1, 7] [inf, 4, 0, inf, inf] [2, 5, -5, 0, -2] [inf, inf, inf, 6, 0] --------- [0, 3, 8, 4, -4] [inf, 0, inf, 1, 7] [inf, 4, 0, 5, 11] [2, 5, -5, 0, -2] [inf, inf, inf, 6, 0] --------- [0, 3, 8, 4, -4] [inf, 0, inf, 1, 7] [inf, 4, 0, 5, 11] [2, -1, -5, 0, -2] [inf, inf, inf, 6, 0] --------- [0, 3, -1, 4, -4] [3, 0, -4, 1, -1] [7, 4, 0, 5, 3] [2, -1, -5, 0, -2] [8, 5, 1, 6, 0] --------- [0, 1, -3, 2, -4] [3, 0, -4, 1, -1] [7, 4, 0, 5, 3] [2, -1, -5, 0, -2] [8, 5, 1, 6, 0] --------- =================================================== [None, 1, 1, None, 1] [None, None, None, 2, 2] [None, 3, None, None, None] [4, None, 4, None, None] [None, None, None, 5, None] --------- [None, 1, 1, None, 1] [None, None, None, 2, 2] [None, 3, None, None, None] [4, 1, 4, None, 1] [None, None, None, 5, None] --------- [None, 1, 1, 2, 1] [None, None, None, 2, 2] [None, 3, None, 2, 2] [4, 1, 4, None, 1] [None, None, None, 5, None] --------- [None, 1, 1, 2, 1] [None, None, None, 2, 2] [None, 3, None, 2, 2] [4, 3, 4, None, 1] [None, None, None, 5, None] --------- [None, 1, 4, 2, 1] [4, None, 4, 2, 1] [4, 3, None, 2, 1] [4, 3, 4, None, 1] [4, 3, 4, 5, None] --------- [None, 3, 4, 5, 1] [4, None, 4, 2, 1] [4, 3, None, 2, 1] [4, 3, 4, None, 1] [4, 3, 4, 5, None] --------- 节点1到节点1的最短路径为: 1 节点1到节点2的最短路径为: 1 5 4 3 2 节点1到节点3的最短路径为: 1 5 4 3 节点1到节点4的最短路径为: 1 5 4 节点1到节点5的最短路径为: 1 5 节点2到节点1的最短路径为: 2 4 1 节点2到节点2的最短路径为: 2 节点2到节点3的最短路径为: 2 4 3 节点2到节点4的最短路径为: 2 4 节点2到节点5的最短路径为: 2 4 1 5 节点3到节点1的最短路径为: 3 2 4 1 节点3到节点2的最短路径为: 3 2 节点3到节点3的最短路径为: 3 节点3到节点4的最短路径为: 3 2 4 节点3到节点5的最短路径为: 3 2 4 1 5 节点4到节点1的最短路径为: 4 1 节点4到节点2的最短路径为: 4 3 2 节点4到节点3的最短路径为: 4 3 节点4到节点4的最短路径为: 4 节点4到节点5的最短路径为: 4 1 5 节点5到节点1的最短路径为: 5 4 1 节点5到节点2的最短路径为: 5 4 3 2 节点5到节点3的最短路径为: 5 4 3 节点5到节点4的最短路径为: 5 4 节点5到节点5的最短路径为: 5
|