(beginer)网络流(最小割最大流) UVA 1212 - Duopoly
来源:互联网 发布:excel筛选出多个数据 编辑:程序博客网 时间:2024/06/04 19:21
The mobile network market in country XYZ used to be dominated by two large corporations, XYZ Telecom and XYZ Mobile. The central government recently has realized that radio frequency spectrum is a scarce resource and wants to regulate its usage. The spectrum currently in use is divided into 300,000 channels. Any wireless service provider who wishes to use certain spectrum should apply for licenses on these channels. While some services may require use of multiple channels, a single channel can not be shared by different services.
The central government wants to maximize its revenue from the spectrum by putting the channels up to an auction. The only two bidders are XYZ Telecom and XYZ Mobile. They are allowed to place bids on combinations of channels, through which their services can communicate with the customers. Furthermore, the government stipulates that a company can only place at most one bid on a specific channel.
The government can only accept a subset of the bids so none of them would conflict with each other. However, officials soon find out that it is a difficult task to determine the winning bids in order to maximize the revenue, and they are asking for your help.
Input
Standard input will contain multiple test cases. The first line of the input is a single integer T
Each test case has two bid description sections, which are for XYZ Telecom and XYZ Mobile, respectively. Each section starts with an integer N
Output
Results should be directed to standard output. Start each case with "Case #
For each test case, print the maximized revenue the government is able to collect by issuing licenses on the channels.
Sample Input
2345 151 262 3454 115 233 32 4 5520 118 223 454 3 5 617 7436 1 2 328 547 4 716 6
Sample Output
Case 1:169Case 2:139
- (beginer)网络流(最小割最大流) UVA 1212 - Duopoly
- uva 1212 Duopoly (最小割最大流)
- UVA 1212 - Duopoly(最小割)
- UVA 1212 - Duopoly(最小割)
- (beginer) 最小费用最大流 UVA 10806 - Dijkstra, Dijkstra.
- (beginer) 网络流(最小费用流+费用跟流量有关) UVA 1486 - Transportation
- 最大流最小割 UVA
- (beginer) 网络流(最大流+二分) UVA 1345 - Jamie\'s Contact Groups
- (beginer) 网络流(区间模型+最大费用流) UVA 1317 Concert Hall Scheduling
- Uva 11248Frequency Hopping 网络流 最大流最小割
- UVa 10480 Sabotage ( 最小割最大流定理)
- UVA 11248 Frequency Hopping(最大流、最小割)
- 最大流,最小割(水塘,uva 1515)
- (beginer) 网络流(拆点) UVA 563 Crimewave
- 网络流(最小割最大流)【POJ3469】
- 网络流(最小割最大流)【POJ3308】
- 网络流(最大流,最小割)基础入门详解
- 求最大网络流(最小割)总结
- (beginer) 最小费用最大流 UVA 10806 - Dijkstra, Dijkstra.
- (beginer) 网络流(最大流+二分) UVA 1345 - Jamie\'s Contact Groups
- 《将博客搬至CSDN》
- (beginer) 网络流(拆点+时序模型) UVA 1161 - Objective: Berlin
- (beginer) 网络流(拆点)UVA 12125 - March of the Penguins
- (beginer)网络流(最小割最大流) UVA 1212 - Duopoly
- (beginer) 网络流(区间模型+最大费用流) UVA 1317 Concert Hall Scheduling
- (beginer) 网络流(最小费用流+费用跟流量有关) UVA 1486 - Transportation
- (beginer) 网络流 UVA 10249 - The Grand Dinner
- OOC源码(二)
- C++中的引用
- CSS中不为人知Zoom属性的使用介绍(IE私有属性)
- mj评《大闹天宫》-8分
- 走出浮躁的泥沼