随笔分类 - 最小生成树
摘要:Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each oth
阅读全文
摘要:Economic times these days are tough, even in Byteland. To reduce the operating costs, the government of Byteland has decided to optimize the road ligh
阅读全文
posted @ 2018-11-13 21:50
black_hole6
摘要:某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出
阅读全文

浙公网安备 33010602011771号