迪杰斯特拉(Dijkstra)算法Python实现
import numpy as np
def Input_Fun():
n = int(input().strip())
weight = []
for i in range(n):
temp = input().split(’ ')
for j in temp:
weight.append(int(j))
weights = np.array(weight).reshape(n, n)
print(n)
print(weights)
return n, weights
def Result_Output(
转载
2020-07-06 20:59:18 ·
634 阅读 ·
0 评论