当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3163:King of Fighters

Special Judge 特殊评判
题目描述

styc and Sempr are fond of the game King of Fighters (KOF). KOF is a two-player game where the two players each pick three different characters as their heroes each to fight several mano-a-mano rounds. The players can pick the same characters. Each round one hero of either player is eliminated. Once all three heroes of one player are eliminated, the other wins the game.

In the past versions, the set of characters to be picked as heroes is very limited. styc and Sempr have long been bored with them. Now they have just got the latest version of the game. In this version, up to M (M ≤ 105) characters are available. And a player can pick up to N (N ≤ 10) of them as his hero. To prevent the game from lasting too long since there’ll be more rounds to play, the rule is modified that the players’ heroes fight in pairs fixed before the game starts.. After some practice rounds, styc takes on Sempr in a bet that his heroes will beat all Sempr’s in a full N-round game. He has managed to know in advance the N characters Sempr will pick for the game and the probabilities that Sempr wins a round of all possible pairs of heroes. To win the bet, styc must be very careful at choosing his heroes, so that his winning probability is maximized.

输入解释

The input contains several test cases. Each test case starts with a line containing the integer N and M. Then follow a probability matrix of N rows and M columns { pij }N × M, where pij is the probability that Sempr wins a round if his i-th hero fights with styc's choice of the j-th character as the hero. Process to end of file.

输出解释

For each test case, output the probablity that styc wins the bet to arbitrary precision as long as the relative error does not exceed 10−6.

输入样例
3 5
0.50 0.50 0.50 0.50 0.50
0.50 0.50 0.50 0.50 0.50
0.50 0.50 0.50 0.50 0.50
输出样例
0.125
提示

Outputting in scientific form is recommended.


该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3163

最后修改于 2020-10-29T06:54:37+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
3000 131072