The Head Elder of the tropical island of Lagrishan has a problem. A bu的中文翻譯

The Head Elder of the tropical isla


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 roads relentlessly, so the large road network is too expensive to maintain. The Council of Elders must choose to stop maintaining some roads. The map above on the left shows all the roads in use now and the cost in aacms per month to maintain them. Of course there needs to be some way to get between all the villages on maintained roads, even if the route is not as short as before. The Chief Elder would like to tell the Council of Elders what would be the smallest amount they could spend in aacms per month to maintain roads that would connect all the villages. The villages are labeled A through I in the maps above. The map on the right shows the roads that could be maintained most cheaply, for 216 aacms per month. Your task is to write a program that will solve such problems.

The input consists of one to 100 data sets, followed by a final line containing only 0. Each data set starts with a line containing only a number n, which is the number of villages, 1 < n < 27, and the villages are labeled with the first n letters of the alphabet, capitalized. Each data set is completed with n-1 lines that start with village labels in alphabetical order. There is no line for the last village. Each line for a village starts with the village label followed by a number, k, of roads from this village to villages with labels later in the alphabet. If k is greater than 0, the line continues with data for each of the k roads. The data for each road is the village label for the other end of the road followed by the monthly maintenance cost in aacms for the road. Maintenance costs will be positive integers less than 100. All data fields in the row are separated by single blanks. The road network will always allow travel between all the villages. The network will never have more than 75 roads. No village will have more than 15 roads going to other villages (before or after in the alphabet). In the sample input below, the first data set goes with the map above.

The output is one integer per line for each data set: the minimum cost in aacms per month to maintain a road system that connect all the villages. Caution: A brute force solution that examines every possible set of roads will not finish within the one minute time limit.
0/5000
原始語言: -
目標語言: -
結果 (中文) 1: [復制]
復制成功!
Lagrishan 热带岛头老有问题。一阵外国援助资金花在村庄几年前之间的额外道路。但丛林赶超道路无情,所以大道路网是维护费用太昂贵。长老理事会必须选择停止一些公路养护。上面左边的地图显示所有的道路中使用现在和 aacms 每月维持他们的成本。当然需要一些方法去维护道路上的所有村庄之间即使路线不是前尽可能短。首席长老想告诉长老会是什么的最小的量,他们可以花在 aacms 每月保持将连接所有村庄的道路。村庄在地图上面通过我标记为 A。在右边地图显示可以为 216 aacms 每月最便宜,维护道路。你的任务是编写一个程序,能够解决这些问题。输入包含 1 到 100 的数据集,紧接着一场决赛线包含只有 0。每个数据集包含只有一个数字 n,这是许多村庄,1 行开始 < n < 27 和村庄标记与第 n 个字母的字母表,首字母大写。每个数据集被完成开始与村庄标签按字母顺序排列的 n-1 行。有是没有线的最后一个村庄。为一个村庄的每一行开头村庄标签及后面的数目,k,从这个村子标签字母表中靠后的乡村道路。如果 k 大于 0,行继续与数据为每个 k 道路。每条道路数据是其后每月的保养费用在 aacms 路这条路的另一端的村庄标签。维修费用将小于 100 的正整数。由单个空格分隔行中的所有数据字段。路网将始终允许旅行之间的所有村庄。网络将永远不会有超过 75 的道路。没有村庄将有超过 15 条道路去其他村庄 (之前或之后在字母表中)。在下面的示例输入,第一个数据集配上面的地图。输出是一个整数,每条线每个数据集: aacms 每月保持道路系统连接的所有村庄的最低成本。警告: 一种蛮力解决方案,检查每个可能的组的道路不会在一分钟的时间限制内完成。
正在翻譯中..
結果 (中文) 3:[復制]
復制成功!
我做衣服。
正在翻譯中..
 
其它語言
本翻譯工具支援: 世界語, 中文, 丹麥文, 亞塞拜然文, 亞美尼亞文, 伊博文, 俄文, 保加利亞文, 信德文, 偵測語言, 優魯巴文, 克林貢語, 克羅埃西亞文, 冰島文, 加泰羅尼亞文, 加里西亞文, 匈牙利文, 南非柯薩文, 南非祖魯文, 卡納達文, 印尼巽他文, 印尼文, 印度古哈拉地文, 印度文, 吉爾吉斯文, 哈薩克文, 喬治亞文, 土庫曼文, 土耳其文, 塔吉克文, 塞爾維亞文, 夏威夷文, 奇切瓦文, 威爾斯文, 孟加拉文, 宿霧文, 寮文, 尼泊爾文, 巴斯克文, 布爾文, 希伯來文, 希臘文, 帕施圖文, 庫德文, 弗利然文, 德文, 意第緒文, 愛沙尼亞文, 愛爾蘭文, 拉丁文, 拉脫維亞文, 挪威文, 捷克文, 斯洛伐克文, 斯洛維尼亞文, 斯瓦希里文, 旁遮普文, 日文, 歐利亞文 (奧里雅文), 毛利文, 法文, 波士尼亞文, 波斯文, 波蘭文, 泰文, 泰盧固文, 泰米爾文, 海地克里奧文, 烏克蘭文, 烏爾都文, 烏茲別克文, 爪哇文, 瑞典文, 瑟索托文, 白俄羅斯文, 盧安達文, 盧森堡文, 科西嘉文, 立陶宛文, 索馬里文, 紹納文, 維吾爾文, 緬甸文, 繁體中文, 羅馬尼亞文, 義大利文, 芬蘭文, 苗文, 英文, 荷蘭文, 菲律賓文, 葡萄牙文, 蒙古文, 薩摩亞文, 蘇格蘭的蓋爾文, 西班牙文, 豪沙文, 越南文, 錫蘭文, 阿姆哈拉文, 阿拉伯文, 阿爾巴尼亞文, 韃靼文, 韓文, 馬來文, 馬其頓文, 馬拉加斯文, 馬拉地文, 馬拉雅拉姆文, 馬耳他文, 高棉文, 等語言的翻譯.

Copyright ©2024 I Love Translation. All reserved.

E-mail: