Page 1 of 1

246 - 10-20-30

Posted: Sun Mar 25, 2007 6:08 pm
by Mr.south
i got WA, but the run time is only 0.006 second


this is part of my code of scan file
int pile[8][52];

scanf("%d", &pile[0][0]);
if(pile[0][0] == 0)
scanf("%d", &pile[0]);

When is Draw

Posted: Mon Nov 19, 2007 1:08 am
by baodog
How do we know how many cards is dealt for a draw??
The problem does not state this. It says a draw occurs
if you can never win or loss. But how many cards for the output?
(Draw: ???) Theoretically,
it should be 0, because you know the cards in the
deck, but instead it's some >0 number as shown in the
sample input. Can someone clarify this? Thanks in advance.

Posted: Mon Nov 19, 2007 10:30 am
by baodog
Nevermind, I get it now. Same state repeated = draw step.

Re: 246 WA

Posted: Tue Oct 20, 2009 11:25 pm
by bleed1979
Does anyone have a efficient method?

I use string and functions like sprintf() and strcmp() to memorize all cards, and got AC 0.392s.

but I thknk this method is too slow to detect "state repeated".