Page 1 of 1

11112 - Babylonian Roulette

Posted: Sun Oct 08, 2006 9:48 pm
by sclo
For some reason I keep getting WA. Maybe I misunderstood the problem.
Here's my code (a=pot at beginning b = bet, c = pot at the end)

Code: Select all

AC...

Posted: Sun Oct 08, 2006 11:44 pm
by david
You are assuming that at at least one player must turn the roulette, but this isn't so. (Zero is a valid answer).

Posted: Mon Oct 09, 2006 1:00 am
by sclo
david wrote:You are assuming that at at least one player must turn the roulette, but this isn't so. (Zero is a valid answer).
Now I got AC, but my assumptions contradicts the problem statements.
In other case, the printed answer is one positive integer number telling the minimal number of players that could turn the roulette for the day corresponding to the annotations.
Also another assumption that I have to make is that P0<bet is valid. It is not clear from the problem statement whether this case is valid or not.
If at some turn the pot was less than the bet, the game was ended for that day
It should be "If P(t+1) < bet then the game ends...."

Posted: Tue Apr 10, 2007 10:01 pm
by kgrant
Hi I think I have also misunderstood the question... I keep getting WA

Code: Select all

AC
Any ideas what tricky cases I am getting wrong?

Edit: I misunderstood last rule of the game..

Posted: Wed Apr 11, 2007 11:21 pm
by Jan
How about this case...

Input:

Code: Select all

104 475 579
0 0 0
Output:

Code: Select all

1
Hope it helps.

Posted: Thu Apr 12, 2007 12:18 am
by kgrant
Thank you Jan. I get AC now.

I misunderstood Simon's comment regarding the rule
If at some turn the pot was less than the bet, the game was ended for that day

Re: 11112 - Babylonian Roulette

Posted: Sat Aug 14, 2010 5:16 am
by annhy
I don't like this kind of problem. :-?

Since my English is poor, I spent more than 40 minutes for reading and understanding the article. After I understood this problem, I spent only about 4 minutes to coding and submit. I think this problem is suitable for the "English reading contest" rather than the "programming contest".