IPL1  IPL  CRICKET TOURNAMENT
NOTE: This problem needs knowledge about the game cricket.
Those who know the basics about IPL can skip the first paragraph.
IPL is one of the famous cricket tournaments. Every match is played between two teams. Each team has eleven players. When the first team bats, the second team bowls. The second team’s aim is to get more score/runs than the first team and the first team’s aim is to defend their score. Each team can bat either till the end of 20 overs or until they lose 10 wickets. 6 balls are bowled every over.
The possible things that can happen in any ball are dotball, 1 run, 2 runs, 3 runs, 4 runs, 5 runs, 6 runs, wide, noball, wicket. For any noball or a wide, 1 run is granted and the ball is not counted. Assume that these things can happen with equal probability.
You are given the overs gone, the current score/wickets and the Target. Find the winning probability of the chasing team.
Input Specifications:
The first line consists of an integer t, denoting the number of test cases. Then for the next t lines, each test case consists of three inputs. The overs, current score and the target score.
Output Specifications:
For each test case output the winning probability(in percentage) of the chasing team.
Note: The first two decimal places in it's representation should be printed without rounding
Input Constraints:
1<=t<=1000
0.0 <= Overs <= 20.0
0<= Score <= 300
0<= Wickets <= 10
Score <= Target <= 300
Sample Input:
10
19.4 129/9 129
20.0 100/10 100
19.5 0/9 100
19.5 0/0 1
0.0 0/0 300
0.0 0/0 200
0.0 0/0 100
10.0 0/0 100
10.0 0/5 100
13.5 112/4 222
Sample Output:
100.00
100.00
0.00
80.00
18.02
61.65
97.60
97.60
55.49
35.84
hide comments
cegprakash:
20120614 15:43:48
@Ranjith Mudalaiyar: Yes. But I'm not interested in seeing a lot of TLEs in submissions page 

Ranjith Mudalaiyar:
20120612 11:40:38
@cegprakash I personally feel that the time limit is too much.. 1s is more than enough for a test file


Better late than never !!!:
20120605 04:01:57
Finally figured it. Feeling relieved :) It was a very tough probability question, I must say that !!!! Implementing it was a lot tougher !!!!


cegprakash:
20120530 16:10:37
@Forgotten_Love: You have to figure that out 

Loving Primes Yummy :D :):
20120527 05:32:35
how is the answer 18.02 for the fifth test case??? plz explain..!! 
Added by:  cegprakash 
Date:  20120510 
Time limit:  3.412s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 GOSU 