Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.
Problem hidden on 2014-03-29 17:26:51 by Francky

BOM - Box Office Moollah

Box-office Moolah

Everyone knows of the famous movie star Vijay. A lesser known fact is that Vijay would travel back in time to pick the right movies to act in. Vijay has grown weary of having to travel back in time to see if the movie is a hit or a flop. Vijay needs your help!

N directors approach Vijay giving him the opportunity to act in their movies. By travelling back in time Vijay determines if the movie would become a hit or not by determining the order in which he has to give the call sheet to the directors. Your program should help process the data and find the order in which he should work with the directors so that the probability of getting maximum collections in that year is high.

Note: The probability of all his movies running successfully is equal to the product of individual movies running successfully.

Input

The first line will contain an integer N, the number of Directors and movies (1 ≤ N ≤ 20).

The following N lines will contain N integers between 0 and 100, inclusive (the probability in percentage). The j-th integer on the ith line is the probability that Director i’s movie would successfully run if Vijay acts in the jth order.

 

Output

Output the probability of getting maximum collections in that year up to 12 decimal places.   

Sample Tests
Input 1:
2
100 100
50 50
Input 2:
2
0 50
50 0
Input 3:
3
25 60 100
13 0 50
12 70 90

Output 1:
50.000000000000
Output 2:
25.000000000000
Output 3:
9.100000000000


Added by:Arjun Krishnan
Date:2014-03-16
Time limit:3s-5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:ASM32-GCC MAWK BC C-CLANG C NCSHARP CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JAVA JS-MONKEY JULIA KTLN NIM OBJC OBJC-CLANG OCT PHP PICO PROLOG PYTHON PYPY PYPY3 R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET

hide comments
2014-03-17 13:27:29 Francky
Please allow all languages and make sure solution can pass with slow languages unless you can provide a justification. Hidden waiting for that. Thanks for your comprehension.
2014-03-17 13:27:29 Sam Winchester
can someone explain the output please ????
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.