摘要:
给出N个点的坐标 边的权值为两点间的距离 删掉其中某点 求最小生成树的权值和 要求这权值最小因为最多50个点 所以具体是删哪个点 用枚举假如有4个点 就要求4次最小生成树 分别是2 3 4 | 1 3 4 | 1 2 4 | 1 2 3 这些点的Sample Input250 01 018 0... 阅读全文
摘要:
Sample Input31 2 1 0 //u v w 是否已建 1 3 2 02 3 4 031 2 1 01 3 2 02 3 4 131 2 1 01 3 2 12 3 4 10 Sample Output310将已经建好的路的权值设为0 1 # include 2 # include ... 阅读全文
摘要:
Sample Input2210 10 //坐标20 2031 12 21000 1000 Sample Output1414.2 //最小权值和*100 保留1位小数oh! //不连通prim 1 # include 2 # include 3 # include 4 # incl... 阅读全文
摘要:
Sample Input1 //T3 //n0 990 692 //邻接矩阵990 0 179692 179 0Sample Output692prim 1 # include 2 # include 3 # include 4 # include 5 # include 6 # def... 阅读全文
摘要:
题目大意是就是给出n个长度为7的字符串,每个字符串代表一个车,定义车的距离是两个字符串间不同字母的个数,题目要求的数不同的车的距离的最小值,即所求的就是最小生成树Sample Input4aaaaaaabaaaaaaabaaaaaaabaaaa0Sample OutputThe highest po... 阅读全文