摘要: 这道题可以转化为TSP问题, 预处理各个顶点之间的最短路即可。 其中dp[s][j]表示已经访问过s个顶点, 最后访问的一个城市编号为j,代码如下: #include <cstdio> #include <cstring> #include <algorithm> using namespace s 阅读全文
posted @ 2015-12-10 18:16 xing-xing 阅读(227) 评论(0) 推荐(0) 编辑