## 11755 - Table Tennis

Moderator: Board moderators

serur
A great helper
Posts: 251
Joined: Thu Feb 23, 2006 11:30 pm

### 11755 - Table Tennis

Input:

Code: Select all

``````1
WWWWWLLLLLWWWWWLLLLLWWWWWLLLLLWWWWWLLLLL
1.000 0.000
``````
Output: 0.00000
If there is ever a war between men and machines, it is easy to guess who will start it (c) Arthur Clarke

sohel
Guru
Posts: 856
Joined: Thu Jan 30, 2003 5:50 am
Location: New York

### Re: 11755 - Table Tennis

Yes, output for the case is 0.00000.

plamplam
Experienced poster
Posts: 150
Joined: Fri May 06, 2011 11:37 am

### Re: 11755 - Table Tennis

Some inputs are provided below. This problem was great but could have been much better if only valid game states were given as input.

Code: Select all

``````25
WWWWWWWWWWWWWWWWWWWW
0.001 0.001
WWWWWWWWWWWWWWWWWW
0.644 0.046
WWWWWWWWWWWWWWWWWW
0.413 0.092
LLLLLLLLLLLLLLLLLLLLL
0.31 0.314
WWWWWLLLLLWWWWWLLLLLWWWWWLLLLLWWWWWLLLLLWWWWWLLLLLWWWWWLLLLLWWWWWLLLLLWWWWWLLLLL
0.314 0.587
WWWWWWWWWWWWWWWWWWWWWL
0.5 0.5
WWWWWLLLLLWWWWWLLLLLWWWWWLLLLLWWWWWLLLLL
1.000 0.000
WWWWWWWWWWWWWWWWWWWW
1.0 0.234
WWWWWWWWWWWWWWWWWWWWW
0.3 0.99
WWWWWWWWWWWWWWWWWWWWWW
1.0     1.0
WL
0.7 0.3
WL
0.001 0.999
WL
0.001 0.001
WL
0.999 0.999
WL
0.999 0.001
WWWWWWWWWWLLLLLLLLLLWWWWWWWWWWLLLLLLLLLL
0.2 0.7
WWWWWWWWWWLLLLLLLLLLWWWWWLLLLL
0.2 0.7

0.123 0.234

0.056 0.682

0.099 0.982

0.915 0.915

0.8 0.8

1.0 0.0

0.0 1.0
``````

Code: Select all

``````Case 1: 0.019811
Case 2: 0.996803
Case 3: 0.938447
Case 4: 0.000000
Case 5: 0.335536
Case 6: -1.000000
Case 7: 0.000000
Case 8: 1.000000
Case 9: 1.000000
Case 10: -1.000000
Case 11: 0.444026
Case 12: 0.990177
Case 13: 0.000000
Case 14: 1.000000
Case 15: 0.009823
Case 16: 0.311309
Case 17: 0.311309
Case 18: 0.000001
Case 19: 0.006202
Case 20: 0.926244
Case 21: 1.000000
Case 22: 0.999995
Case 23: 0.000000
Case 24: 0.000000
Case 25: 0.000000``````
You tried your best and you failed miserably. The lesson is 'never try'. -Homer Simpson

forthright48
New poster
Posts: 37
Joined: Wed Mar 14, 2012 11:57 am
Contact:

### Re: 11755 - Table Tennis

Here is a test case for which I was getting WA.

Code: Select all

``````1
WWW
0.000 1.000
``````