Instantly share code, notes, and snippets.

View tsp.py
def input_data():
num = 4 # 城市数量
c_map = [[0, 1, 10],
[1, 3, 25],
[2, 3, 30],
[0, 2, 15],
[1, 2, 35]]
def trans_map_to_mat(num, map):
mat = [[float("inf")] * num for i in range(num)]