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

Tran Nam Trung (trungduck@yahoo.com) Ask for sample output ? [4] // Problem 1051. Simple Game on a Grid 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
Dinh Quang Hiep (mg9h@yahoo.com) Re: Ask for sample output ? <= Wrong tram trong ! [3] // Problem 1051. Simple Game on a Grid 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)
> > 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)
> > > 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)
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