摘要: Problem Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes r... 阅读全文
posted @ 2016-12-29 23:42 Pic 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Problem Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。 Input 测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 1 #inclu... 阅读全文
posted @ 2016-12-29 23:38 Pic 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Problem Description 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input 测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( #include #include #d... 阅读全文
posted @ 2016-12-29 23:24 Pic 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Problem Description 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测 阅读全文
posted @ 2016-12-29 23:12 Pic 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his sma 阅读全文
posted @ 2016-12-29 22:21 Pic 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Problem 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 阅读全文
posted @ 2016-12-29 21:28 Pic 阅读(177) 评论(0) 推荐(0) 编辑