0
点赞
收藏
分享

微信扫一扫

北京大学ACM Problems 1018:Communication System

探头的新芽 2022-05-03 阅读 67

Communication System

Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 35638 Accepted: 12635

Description

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.

Input

The first line of the input file contains a single integer t (1 ≤ t ≤ 10), the number of test cases, followed by the i

举报

相关推荐

0 条评论