Uneven Coin Toss Outcome
You are given
i-th coin having probability
of landing heads when tossed. Your task is to calculate the probability of obtaining more heads than tails after tossing all
The first line contains a single integer
n(1 ≤ n ≤ 2000), representing the number of coins.
The second line contains
with two decimal places (0 ≤ ≤ 1), representing the probabilities of the
i-th coin landing heads.
The program should print a single floating-point number representing the probability of obtaining more heads than tails after tossing all the
3 0.3 0.6 0.4
5 0.42 0.01 0.42 0.99 0.42
Time limit: 2.5 seconds
Memory limit: 512 MB
Output limit: 1 MB