Limits 1s, 512 MB

Sanvi is playing with a coin in which number 1 is written on the top side and number 0 is written at the bottom side. She is planning to toss the coin exactly NN times. What is the probability that summation of coin tosses will either be A or B? Your task is to help her find the answer.

Input

Input starts with an integer TT (1T1000001≤T≤100000) denoting the total number of test-cases. Every test-case starts with NN (1N301 ≤ N ≤ 30), denoting the total number of times coin is tossed. This is followed by a single line containing two different non-negative integer numbers having value at most NN, separated by a single space, denoting AA and BB respectively. (ABA \ne B, 0A,BN0 \le A, B \le N)

Output

For every case of input, output the answer in a single line denoting the answer as described in the problem statement. Error less than 10610^{-6} will be ignored.

Sample

InputOutput
2
1
0 1
2
2 1
1.000000
0.750000

Submit

Login to submit.

Statistics

82% Solution Ratio
NirjhorEarliest, Jul '18
user.2573Fastest, 0.0s
flash_7Lightest, 1.0 MB
tuxboyShortest, 416B
Toph uses cookies. By continuing you agree to our Cookie Policy.