2.11号英语翻译(补)
题目来源:http://noi.openjudge.cn/ch0406/20/
重点词汇:
device : n. 设备;
manufacturer : n.制造商;
bandwidth:n.带宽;
decimal point:小数点;
20:Communication System
- 查看
- 提交
- 统计
- 提问
- 总时间限制:
- 1000ms
- 内存限制:
- 65536kB
- 描述
- We have received an order from Pizoor Communications Inc. for a special communication system. The system consists of several devices. For each device, we are free to choose from several manufacturers. Same devices from two manufacturers differ in their maximum bandwidths and prices.
By overall bandwidth (B) we mean the minimum of the bandwidths of the chosen devices in the communication system and the total price (P) is the sum of the prices of all chosen devices. Our goal is to choose a manufacturer for each device to maximize B/P. -
我们收到了来自 Pizoor Communications Inc. 的特殊通信系统订单。该系统由几个设备组成。对于每种设备,我们可以从多个制造商中自由选择。来自两家制造商的相同设备的最大带宽和价格不同。
总带宽(B)是指通信系统中所选设备的最小带宽,总价格(P)是所有所选设备价格的总和。我们的目标是为每个设备选择制造商以最大化 B/P。 - 输入
- The first line of the input file contains a single integer t (1 ≤ t ≤ 10), the number of test cases, followed by the input data for each test case. Each test case starts with a line containing a single integer n (1 ≤ n ≤ 100), the number of devices in the communication system, followed by n lines in the following format: the i-th line (1 ≤ i ≤ n) starts with mi (1 ≤ mi ≤ 100), the number of manufacturers for the i-th device, followed by mi pairs of positive integers in the same line, each indicating the bandwidth and the price of the device respectively, corresponding to a manufacturer.
- 输入文件的第一行包含一个整数 t (1 ≤ t ≤ 10),即测试用例的数量,然后是每个测试用例的输入数据。每个测试用例以包含单个整数 n (1 ≤ n ≤ 100) 的行开始,即通信系统中的设备数量,后跟 n 行,格式如下:第 i 行 (1 ≤ i ≤ n)以mi (1 ≤ mi ≤ 100)开头,第i个设备的制造商数量,后面是mi对同一行的正整数,分别表示设备的带宽和价格,对应一个制造商.
- 输出
- Your program should produce a single line for each test case containing a single number which is the maximum possible B/P for the test case. Round the numbers in the output to 3 digits after decimal point.
- 您的程序应该为每个测试用例生成一行,其中包含一个数字,这是测试用例可能的最大 B/P。将输出中的数字四舍五入到小数点后 3 位。
- 样例输入
-
1 3 3 100 25 150 35 80 25 2 120 80 155 40 2 100 100 120 110
- 样例输出
-
0.649
- 来源
- Tehran 2002, First Iran Nationwide Internet Programming Contest