QOJ.ac

QOJ

Limite de temps : 1.0 s Limite de mémoire : 32 MB Points totaux : 70

#17549. Bond

Statistiques

大家都知道著名的特工 007,也就是大名鼎鼎的邦德(James Bond)。但鲜为人知的是,他其实并没有亲自执行大部分任务,而是由他的表亲们——吉米·邦德(Jimmy Bonds)们代为完成。邦德(James Bond)已经厌倦了每次有新任务时都要给吉米·邦德们分配任务,因此他请求你来帮他解决这个难题。

每个月,邦德(James Bond)都会收到一份任务清单。根据以往任务的详细情报,对于每一项任务和每一个吉米·邦德,他都会计算出该吉米·邦德成功完成该任务的概率。你的程序需要处理这些数据,并找到一种分配方案,使得所有任务都成功完成的概率最大。

注意:所有任务均成功完成的概率等于各项任务成功完成的概率之积。

输入格式

第一行包含一个整数 $N$,表示吉米·邦德的人数和任务的数量($1 \le N \le 20$)。

接下来的 $N$ 行,每行包含 $N$ 个介于 $0$ 到 $100$ 之间(含 $0$ 和 $100$)的整数。第 $i$ 行的第 $j$ 个整数表示吉米·邦德 $i$ 成功完成任务 $j$ 的概率,以百分比表示。

输出格式

输出吉米·邦德们成功完成所有任务的最大概率,以百分比形式表示。

注意:与标准答案误差在 $\pm 0.000001$ 以内的输出将被接受。

样例

输入样例 1

2
100 100
50 50

输出样例 1

50.000000

输入样例 2

2
0 50
50 0

输出样例 2

25.00000

输入样例 3

3
25 60 100
13 0 50
12 70 90

输出样例 3

9.10000

说明

第三个样例的解释:如果吉米·邦德 1 被分配到第 3 个任务,吉米·邦德 2 被分配到第 1 个任务,吉米·邦德 3 被分配到第 2 个任务,则概率为:$1.0 \times 0.13 \times 0.7 = 0.091 = 9.1\%$。所有其他分配方案的成功概率都更小。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.