You have a collection of old Swedish coins. Every coin has a probability of landing heads (and a probability of landing tails). Consider the following experiment for every subset of : Flip each coin in exactly once, and count the number of heads; you win if this number is odd. Let denote the winning probability of the subset .
Given two real numbers and , and a collection of coins , how many subsets of are such that ?
Input consists of several cases. Every case begins with two real numbers and , followed by , followed by . Assume , and .
For every case, print the number of subsets such that . The input cases have no precision issues.
Please take into account that the result can be larger than .
Author: Salvador Roura
Generation: 2026-01-25T12:07:48.911Z
© Jutge.org, 2006–2026.
https://jutge.org