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: King of Fighters
Description 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 Input The input contains several test cases. Each test case starts with a line containing the integer _{N × M}, where p is the probability that Sempr wins a round if his _{ij}i-th hero fights with styc's choice of the j-th character as the hero. Process to end of file.Output 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 Sample Input 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 Sample Output 0.125 Hint Outputting in scientific form is recommended. Source POJ Monthly--2006.12.31, flymouse |

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

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

Any problem, Please Contact Administrator