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 1216. Two Pawns and One King

White moves first or black moves first?
Posted by Lin 27 Oct 2002 19:37
I can't understand them any more!! Can anybody describe it a little more clearly? What's the usage of the Balck King?
Posted by Safe Bird (USU) 29 Oct 2002 09:38
Some notes on the 1216
Posted by Leonid Volkov 29 Oct 2002 09:52
1) White moves first.
2) The game is being played according to the usual chess rules, but
if the white pawn reaches the Nth horizontal, the game immediately
stops.
3) How could Black win? There are 5 actual possiblities
   a) Beat the white pawn with the King
   b) Block the movement of the white pawn with the King
   c) Block the movement of the white pawn with the Pawn
   d) Promote the black pawn to the Queen (or something else) and
then beat the white pawn with this new piece
   e) Promote the black pawn to the Queen (or something else) and
then block the movement of the white pawn with this new piece
Thanks a lot. But why nobody has solved this problem yet?
Posted by Safe Bird (USU) 29 Oct 2002 10:07
> 1) White moves first.
> 2) The game is being played according to the usual chess rules, but
> if the white pawn reaches the Nth horizontal, the game immediately
> stops.
> 3) How could Black win? There are 5 actual possiblities
>    a) Beat the white pawn with the King
>    b) Block the movement of the white pawn with the King
>    c) Block the movement of the white pawn with the Pawn
>    d) Promote the black pawn to the Queen (or something else) and
> then beat the white pawn with this new piece
>    e) Promote the black pawn to the Queen (or something else) and
> then block the movement of the white pawn with this new piece
>
>
I have some ideas:
Posted by Safe Bird (USU) 29 Oct 2002 10:20
First, we consider that the site of white pawn is (x1,y1), (x2,y2)
for black pawn, (x3,y3) for Black King. We can consider the following
five lines:

>    a) Beat the white pawn with the King
We can count the least steps of Black King to get to y1+1 or y1-1,
and it could only go left-up or right-up. (I think it's the optimum)

>    b) Block the movement of the white pawn with the King
I think we can ignore it or put it into state a).

>    c) Block the movement of the white pawn with the Pawn
I think if and only if (x2=x1+1 or x2=x1-1) and (y2>=x2+2), then the
black pawn can block the movement of the white pawn and beat it...

>    d) Promote the black pawn to the Queen (or something else) and
> then beat the white pawn with this new piece
first i think because n>5, so we only can promote it to the Queen.
Then the best way to beat the white pawn is to move left to y1. If
and only if x1<=n-2, the Queen can beat it.

>    e) Promote the black pawn to the Queen (or something else) and
> then block the movement of the white pawn with this new piece
I think we can ignore it!!!

Only some ideas, I haven't programme yet. Because of the time...
changed a bug:
Posted by Safe Bird (USU) 29 Oct 2002 10:23
>    d) Promote the black pawn to the Queen (or something else) and
> then beat the white pawn with this new piece
first i think because n>5, so we only can promote it to the Queen.
Then the best way to beat the white pawn is to move left to y1. If
and only if x1<=n-2, the Queen can beat it.

change to:

>    d) Promote the black pawn to the Queen (or something else) and
> then beat the white pawn with this new piece
first i think because n>5, so we only can promote it to the Queen.
Then the best way to beat the white pawn is to move left or right to
y1. If and only if x1<=n-2, the Queen can beat it.
It's really a difficult problem. We should consider if the white pawn can beat the black pawn!!
Posted by Safe Bird (USU) 29 Oct 2002 10:43
See in: (the difficult state)
Posted by Safe Bird (USU) 29 Oct 2002 10:51
*    white pawn
x    black pawn
K    black King
The white first. If we beat the black pawn:

..........
..........
..........
......x...
.....*...K
..........
..........
..........
..........
..........

..........
..........
..........
......*.K.
..........
..........
..........
..........
..........
..........

..........
..........
......*K..
..........
..........
..........
..........
..........
..........
..........

White will lose.....

but if we don't beat the black pawn:

..........
..........
..........
......x...
.....*...K
..........
..........
..........
..........
..........

..........
..........
..........
.....*....
......x..K
..........
..........
..........
..........
..........

..........
..........
.....*....
..........
.........K
......x...
..........
..........
..........
..........

of course white will win!!
What does this sentence mean?
Posted by Safe Bird (USU) 29 Oct 2002 10:59
If it is not Black&#8217;s turn to move, the black King should not be
under check, i.e. in the position, when the white pawn could beat it.
Can everyone give me your testdata(s) of ural1216? I have checked a lot, but I think if we put our testdatas(or ideas) together, the problem will be solved easily. I want to be the programmer, and you
Posted by Safe Bird (USU) 29 Oct 2002 12:02
Can everyone give me your testdata(s) of ural1216? I have checked a
lot, but I think if we put our testdatas(or ideas) together, the
problem will be solved easily. I want to be the programmer, and you
give me the datas, I test..again and again. Can you help me? If I get
ac, of course I will send my program to you all!!! My ideas you can
see at http://acm.timus.ru/messages.asp?id=5753, my msn messager is
zhuzeyuan@hotmail.com, I'm a Chinese.
Now I have found lots of difficult states of it. The problem becomes harder and harder now...
Posted by Safe Bird (USU) 29 Oct 2002 16:57
Re: Some notes on the 1216
Posted by Orshanskiy Sergey 30 Oct 2002 14:54
> 1) White moves first.
> 2) The game is being played according to the usual chess rules, but
> if the white pawn reaches the Nth horizontal, the game immediately
> stops.
> 3) How could Black win? There are 5 actual possiblities
>    a) Beat the white pawn with the King
>    b) Block the movement of the white pawn with the King
>    c) Block the movement of the white pawn with the Pawn
>    d) Promote the black pawn to the Queen (or something else) and
> then beat the white pawn with this new piece
>    e) Promote the black pawn to the Queen (or something else) and
> then block the movement of the white pawn with this new piece
>
>
And what about beating with the pawn?
Re: Some notes on the 1216
Posted by Leonid Volkov 30 Oct 2002 15:38
> And what about beating with the pawn?

That's true, I forgot to mention that case :-)