Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: ACM Computer Factory
Description As you know, all the computers used for ACM contests must be identical, so the participants compete on equal terms. That is why all these computers are historically produced at the same factory. Every ACM computer consists of P parts. When all these parts are present, the computer is ready and can be shipped to one of the numerous ACM contests. Computer manufacturing is fully automated by using Input specification describes which parts must be present in a half-finished computer for the machine to be able to operate on it. The specification is a set of Output specification describes the result of the operation, and is a set of The machines are connected by very fast production lines so that delivery time is negligibly small compared to production time. After many years of operation the overall performance of the ACM Computer Factory became insufficient for satisfying the growing contest needs. That is why ACM directorate decided to upgrade the factory. As different machines were installed in different time periods, they were often not optimally connected to the existing factory machines. It was noted that the easiest way to upgrade the factory is to rearrange production lines. ACM directorate decided to entrust you with solving this problem. Input Input file contains integers S_{i}_{,1} Si_{,2}...S_{i}_{,P} D_{i}_{,1} D_{i}_{,2}...D_{i}_{,P}, where Q specifies performance, _{i}S_{i}_{,j} — input specification for part j, D_{i}_{,k} — output specification for part k.
1 ≤ Output Output the maximum possible overall performance, then If several solutions exist, output any of them. Sample Input
Sample Output
Hint Bold texts appearing in the sample sections are informative and do not form part of the actual data. Source Northeastern Europe 2005, Far-Eastern Subregion |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator