#P4329. [COCI2006-2007#1] Bond

    ID: 3279 Type: RemoteJudge 1000ms 32MiB Tried: 0 Accepted: 0 Difficulty: 4 Uploaded By: Tags>搜索2006Special Judge状态压缩图论建模二分图费用流COCI

[COCI2006-2007#1] Bond

题目描述

Everyone knows of the secret agent double-oh-seven, the popular Bond (James Bond). A lesser known fact is that he actually did not perform most of his missions by himself; they were instead done by his cousins, Jimmy Bonds. Bond (James Bond) has grown weary of having to distribute assign missions to Jimmy Bonds every time he gets new missions so he has asked you to help him out. Every month Bond (James Bond) receives a list of missions. Using his detailed intelligence from past missions, for every mission and for every Jimmy Bond he calculates the probability of that particular mission being successfully completed by that particular Jimmy Bond. Your program should process that data and find the arrangement that will result in the greatest probability that all missions are completed successfully. Note: the probability of all missions being completed successfully is equal to the product of the probabilities of the single missions being completed successfully.

输入格式

The first line will contain an integer N, the number of Jimmy Bonds and missions (1 ≤ N ≤ 20). The following N lines will contain N integers between 0 and 100, inclusive. The j-th integer on the ith line is the probability that Jimmy Bond i would successfully complete mission j, given as a percentage.

输出格式

Output the maximum probability of Jimmy Bonds successfully completing all the missions, as a percentage.

题目大意

nn 个人去执行 nn 个任务,每个人执行每个任务有不同的成功率,每个人只能执行一个任务,求所有任务都执行的总的成功率。

输入第一行,一个整数 nn1n201\leq n\leq 20),表示人数兼任务数。接下来 nn 行每行 nn 个数,第 ii 行第 jj 个数表示第 ii 个人去执行第 jj 个任务的成功率(这是一个百分数,在 00100100 间)。

输出最大的总成功率(这应也是一个百分数)

2
100 100
50 50
50.000000
2
0 50
50 0
25.00000
3
25 60 100
13 0 50
12 70 90
9.10000

提示

Clarification of the third example: If Jimmy bond 1 is assigned the 3rd mission, Jimmy Bond 2 the 1st mission and Jimmy Bond 3 the 2nd mission the probability is: 1.0 * 0.13 * 0.7 = 0.091 = 9.1%. All other arrangements give a smaller probability of success. Note: Outputs within ±0.000001 of the official solution will be accepted.