Page **2** of **2**

Posted: **Thu May 19, 2005 6:01 pm**

by **Cho**

After getting several WA, I couldn't resist to get the offcial data from Waterloo. I found that I failed in a case in the offical data with house limit equals 1, while the problem states that the house limit is at least 2.

Posted: **Mon Jun 13, 2005 7:24 pm**

by **abishek**

I am confused with some probability here. Will stan continue to play after scoring a positive score in the kth round or higher rounds?

if we call stan's score A

isnt the answer to the question

Prob(A>0 after k rounds) + prob(A<= 0 in the kth round) * prob (A>0 in the k+1 th round) +

prob(A<=0 in the kth and (k+1)th round) * prob(A>0 in the k+2 th round) ... uptill the mth round.

but I don't seem to get the sample input

Posted: **Mon Jun 13, 2005 8:44 pm**

by **Cho**

abishek wrote:I am confused with some probability here. Will stan continue to play after scoring a positive score in the kth round or higher rounds?

He will stop playing once he gets his first positive net score after playing k rounds and before the m+1 rounds.

abishek wrote:if we call stan's score A

isnt the answer to the question

Prob(A>0 after k rounds) + prob(A<= 0 in the kth round) * prob (A>0 in the k+1 th round) +

prob(A<=0 in the kth and (k+1)th round) * prob(A>0 in the k+2 th round) ... uptill the mth round.

Did you deal with the conditional probability? I mean your formula should be modified as:

Prob(A>0 in the kth round) +

prob(A<=0 in the kth round) * prob (A>0 in the k+1 th round | A<=0 in the kth round) + ...

Posted: **Mon Jun 27, 2005 10:08 am**

by **tRipper**

Can someone tell me the correct output for this input?

Code: Select all

```
INPUT:
5
3 4 10
1 30 1000
29 30 1000
10 11 50
1 2 2
```

My program outputs:

Code: Select all

```
OUTPUT:
0.5835
0.9664
0.7483
0.6271
0.4898
```

Which gives me a WA..

Posted: **Mon Jun 27, 2005 11:55 am**

by **misof**

tRipper wrote:Can someone tell me the correct output for this input?

My AC program outputs:

Code: Select all

```
0.5835
0.9659
0.7298
0.6044
0.4898
```

Posted: **Mon Jun 27, 2005 1:33 pm**

by **tRipper**

Thanx misof, i found my bug. AC now...