摘要: 题目描述 给定一张 n(n≤20) 个点的带权无向图,点从 0~n-1 标号,求起点 0 到终点 n-1 的最短Hamilton路径。 Hamilton路径的定义是从 0 到 n-1 不重不漏地经过每个点恰好一次。 输入 第一行一个整数n。 接下来n行每行n个整数,其中第i行第j个整数表示点i到j的 阅读全文
posted @ 2018-07-06 12:25 house_cat 阅读(296) 评论(0) 推荐(1) 编辑
摘要: 题目描述 There are N towns on a plane. The i-th town is located at the coordinates (xi,yi). There may be more than one town at the same coordinates. You c 阅读全文
posted @ 2018-07-06 00:11 house_cat 阅读(276) 评论(0) 推荐(0) 编辑