随笔分类 -  最小生成树

摘要: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 阅读全文
posted @ 2018-11-15 00:01 black_hole6 阅读(125) 评论(0) 推荐(0)
摘要: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
摘要: 阅读全文
posted @ 2018-11-10 17:00 black_hole6 阅读(128) 评论(0) 推荐(0)
摘要:某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出 阅读全文
posted @ 2018-11-10 16:58 black_hole6 阅读(128) 评论(0) 推荐(0)