文件名称:BestWriting
介绍说明--下载内容均来自于网络,请自行研究使用
★实验任务
学校有 n 台计算机,为了方便数据传输,现要将它们用数据线连接起来。两台计
算机被连接是指它们之间有数据线连接。由于计算机所处的位置不同,因此不同的两台计算
机的连接费用往往是不同的。
当然,如果将任意两台计算机都用数据线连接,费用将是相当庞大的。为了节省费用,
我们采用数据的间接传输手段,即一台计算机可以间接的通过若干台计算机(作为中转)来
实现与另一台计算机的连接。
现在由你负责连接这些计算机,你的任务是花费最小代价使任意两台计算机都连通(不
管是直接的或间接的),最后你还要说明方案是否唯一。
★数据输入
第一行,一个整数 t,代表有几个测试例。
接下来一行,两个整数 n,m(1<=n<=100,0<=m<=10000)。
接下来 m 行,每行有三个整数 x,y,w,表示连接 x 和 y 这两台计算机需要的费用是
w。(1<=x,y<=n,1<=w<=1000000)
数据保证图是连通的。
★数据输出
对于每个测试例,输出两行:
第一行,输出使任意两台计算机都连通的最小代价。
第二行,如果方案是唯一的,输出 Unique! 否则输出 Not Unique-The school has n computer, in order to facilitate data transmission, we will connect them with data line. Two meter
The computer is connected to the data line refers to the connection between them. Due to the different location of the computer, so the calculation of different two
The cost of connection machine is often different.
Of course, if any two computers are connected with the data line, the cost will be enormous. In order to save costs,
We use indirect means of data transmission, namely a computer can indirectly through several computers (as a transit).
Connect with another computer.
You are now responsible for connecting the computer, your task is to take the minimum cost so that any two computers are not connected (
The tube is directly or indirectly), finally you have to explain whether the plan only.
学校有 n 台计算机,为了方便数据传输,现要将它们用数据线连接起来。两台计
算机被连接是指它们之间有数据线连接。由于计算机所处的位置不同,因此不同的两台计算
机的连接费用往往是不同的。
当然,如果将任意两台计算机都用数据线连接,费用将是相当庞大的。为了节省费用,
我们采用数据的间接传输手段,即一台计算机可以间接的通过若干台计算机(作为中转)来
实现与另一台计算机的连接。
现在由你负责连接这些计算机,你的任务是花费最小代价使任意两台计算机都连通(不
管是直接的或间接的),最后你还要说明方案是否唯一。
★数据输入
第一行,一个整数 t,代表有几个测试例。
接下来一行,两个整数 n,m(1<=n<=100,0<=m<=10000)。
接下来 m 行,每行有三个整数 x,y,w,表示连接 x 和 y 这两台计算机需要的费用是
w。(1<=x,y<=n,1<=w<=1000000)
数据保证图是连通的。
★数据输出
对于每个测试例,输出两行:
第一行,输出使任意两台计算机都连通的最小代价。
第二行,如果方案是唯一的,输出 Unique! 否则输出 Not Unique-The school has n computer, in order to facilitate data transmission, we will connect them with data line. Two meter
The computer is connected to the data line refers to the connection between them. Due to the different location of the computer, so the calculation of different two
The cost of connection machine is often different.
Of course, if any two computers are connected with the data line, the cost will be enormous. In order to save costs,
We use indirect means of data transmission, namely a computer can indirectly through several computers (as a transit).
Connect with another computer.
You are now responsible for connecting the computer, your task is to take the minimum cost so that any two computers are not connected (
The tube is directly or indirectly), finally you have to explain whether the plan only.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
BestWriting.txt