WELL PLACED BALLS
There are W identical white balls, B identical black balls and C
containers. We need to distribute all the balls into some of the
containers. A selection is done by randomly picking a container followed by
randomly picking a ball in it. We need to maximise the probability of
picking a white ball. (If you happen to choose a container with no balls in
it, the probability that you pick a white ball from it is zero).

INPUT
The first line contains T - the number of testcases.
Each test case consists of three integers W,B,C.
You may assume that T <= 10.

OUTPUT
For each test case, output the maximum probability upto 3 decimal places.
Output a '0' before the decimal point if the probability is less than 1.

SAMPLE INPUT

3
1 1 1
0 1 3
1 0 1
SAMPLE OUTPUT

0.500
0.000
1.000
TESTCASE SET
Testcase 1: W,B,C <= 50, score = 50
Testcase 2: W,B,C <= 106, score = 50


plz post the solution??

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to