ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1051. Simple Game on a Grid

Ask for sample output ?
Posted by Tran Nam Trung (trungduck@yahoo.com) 5 Jun 2001 19:17
I think I don't understand exactly this problem. For the
input :

3 4
{
1 2  3  4
5 6  7  8
9 10 11 12
}
I jump 5 6 7 8 over 1 2 3 4 --> 1 2 3 4 are taken away.
Then I jump 5 6 7 8 over 9 10 11 12 --> 9 10 11 12 are
taken away. Then I jump 6 over 5, 7 over 8 --> only 6 and 7
are in the grid. Last I jump 6 over 7 so it's only one
stone in the grid . Why the sample output is 2 ?
Thanks.
71222119
Re: Ask for sample output ? <= Wrong tram trong !
Posted by Dinh Quang Hiep (mg9h@yahoo.com) 6 Jun 2001 00:28
> I think I don't understand exactly this problem. For the
> input :
>
> 3 4
> {
> 1 2  3  4
> 5 6  7  8
> 9 10 11 12
> }
> I jump 5 6 7 8 over 1 2 3 4 --> 1 2 3 4 are taken away.

the remaining board is
 5  6  7  8
 z  z  z  z
 z  z  z  z
 9 10 11 12
so you can't get 5, 6, 7, 8 jump over 9, 10, 11 and 12.

The correct answer is
1 2 3 4     2 z z 3 4    2 9 z 3 4     2 3 4
5 6 7 8  =>   5 6 7 8 =>     6 7 8  => 6 7 8
9 A B C       9 A B C        A B C     A B C
Do the same as above, you'll get the board
3 4
7 8
B C
and then
4
8
C
=> get the board of 2
4
z
z
C

Good luck !

QH@

(z means space)
Re: But the task don't say that : a stone can jump only to the next stone beside ?
Posted by Tran Nam Trung (trungduck@yahoo.com) 6 Jun 2001 08:03
> > I think I don't understand exactly this problem. For
the
> > input :
> >
> > 3 4
> > {
> > 1 2  3  4
> > 5 6  7  8
> > 9 10 11 12
> > }
> > I jump 5 6 7 8 over 1 2 3 4 --> 1 2 3 4 are taken away.
>
> the remaining board is
>  5  6  7  8
>  z  z  z  z
>  z  z  z  z
>  9 10 11 12
> so you can't get 5, 6, 7, 8 jump over 9, 10, 11 and 12.
>
> The correct answer is
> 1 2 3 4     2 z z 3 4    2 9 z 3 4     2 3 4
> 5 6 7 8  =>   5 6 7 8 =>     6 7 8  => 6 7 8
> 9 A B C       9 A B C        A B C     A B C
> Do the same as above, you'll get the board
> 3 4
> 7 8
> B C
> and then
> 4
> 8
> C
> => get the board of 2
> 4
> z
> z
> C
>
> Good luck !
>
> QH@
>
> (z means space)
uh, it's a similar game, maybe the text is not very clearly, but we (who got AC) all understand it by that way ;)
Posted by Dinh Quang Hiep (mg9h@yahoo.com) 6 Jun 2001 09:17
> > > I think I don't understand exactly this problem. For
> the
> > > input :
> > >
> > > 3 4
> > > {
> > > 1 2  3  4
> > > 5 6  7  8
> > > 9 10 11 12
> > > }
> > > I jump 5 6 7 8 over 1 2 3 4 --> 1 2 3 4 are taken
away.
> >
> > the remaining board is
> >  5  6  7  8
> >  z  z  z  z
> >  z  z  z  z
> >  9 10 11 12
> > so you can't get 5, 6, 7, 8 jump over 9, 10, 11 and 12.
> >
> > The correct answer is
> > 1 2 3 4     2 z z 3 4    2 9 z 3 4     2 3 4
> > 5 6 7 8  =>   5 6 7 8 =>     6 7 8  => 6 7 8
> > 9 A B C       9 A B C        A B C     A B C
> > Do the same as above, you'll get the board
> > 3 4
> > 7 8
> > B C
> > and then
> > 4
> > 8
> > C
> > => get the board of 2
> > 4
> > z
> > z
> > C
> >
> > Good luck !
> >
> > QH@
> >
> > (z means space)
Re: uh, it's a similar game, maybe the text is not very clearly, but we (who got AC) all understand it by that way ;)
Posted by HuangWenHao 28 Aug 2005 19:19
xxxx...|  |xxxx...|  |.xxx...|  |..x....|  |..x....|
xxxx...|=>|xxxx...|=>|.xxx...|=>|..x....|=>|..x....|
xxxx...|  |..x.x..|  |x.x.x..|  |xxxxx..|  |x..x.x.|
  |....... |.......
=>|.......=>       =>
  |x.xx.x.  x...xx. x.....x