Lolek and Bolek are arguing on whose turn is to take out the trash.
They have a box with $n$ coins. when the coin $i$ is thrown, the probability that it lands on heads is $p_i$.
They decided to make a game: they throw all the $n$ coins and count how many heads they get. If they get an odd number of heads it's Lolek's turn to take out the trash, otherwise it's Bolek's turn.
Given the values for $n$ and for each $p_i$ how can you tell whether the game is fair or not?
Source: this ipsc problem: https://ipsc.ksp.sk/2012/real/problems/f.html
For the ones who downvoted: this is not a textbook-style problem. I am searching for an efficient algorithmic procedure that, given the set of coins, tells whether the game is fair or not. I'm not searching for a long formula that depends on $n$ and $p_i$