文件名称:TSP
介绍说明--下载内容均来自于网络,请自行研究使用
使用邻接表记录存贮村庄两点的ID和村庄之间的权值。采用广度搜索,利用邓俊辉老师的模板BFS。先任取一点,搜索到它的距离最远的点(带权值)i,点i必然是关键路径上的一个最远点。再以该点为起始点搜索离他距离最远的点(带权值),所得到的一定是donfood即最远路径。-Using adjacency table records the ID stored villages and villages between the two weights. Using breadth search, use Deng Junhui teacher template BFS. Take any point before the search to its farthest point (with weights) i, i must be the point on the critical path of a farthest point. Then search for the starting point of a point farthest away from him (with weights), the resulting path must be donfood is farthest.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
TSP.cpp