10811 - Up the Ante

All about problems in Volume 108. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

User avatar
Cho
A great helper
Posts: 274
Joined: Wed Oct 20, 2004 11:51 pm
Location: Hong Kong

Post by Cho » Thu May 19, 2005 6:01 pm

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.

User avatar
abishek
Experienced poster
Posts: 131
Joined: Mon Dec 15, 2003 5:41 am

Post by abishek » Mon Jun 13, 2005 7:24 pm

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 :(

User avatar
Cho
A great helper
Posts: 274
Joined: Wed Oct 20, 2004 11:51 pm
Location: Hong Kong

Post by Cho » Mon Jun 13, 2005 8:44 pm

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) + ...

tRipper
New poster
Posts: 22
Joined: Sun Mar 13, 2005 5:04 pm
Location: out there

Post by tRipper » Mon Jun 27, 2005 10:08 am

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..

misof
A great helper
Posts: 430
Joined: Wed Jun 09, 2004 1:31 pm

Post by misof » Mon Jun 27, 2005 11:55 am

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

tRipper
New poster
Posts: 22
Joined: Sun Mar 13, 2005 5:04 pm
Location: out there

Post by tRipper » Mon Jun 27, 2005 1:33 pm

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

Post Reply

Return to “Volume 108 (10800-10899)”