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

Why is the solution...
Posted by Stefan Ciobaca 3 Mar 2002 15:12
Suppose: m<=n
if m=1 then sol:=(n+1) div 2 else
begin
  if (m mod 3=0)or(n mod 3=0) then sol:=2 else sol:=1;
end;


Why is this solution correct? Can someone explain this to me please?
You can delete 3-line stones with another stone beside them
Posted by aaakkk 3 Mar 2002 19:56
        o    o
ooo => oo => o =>
  o              o      <= this stone hasn't change his position
                           but it delete 3 stones above itself.

You can delete 3-line stones in this way, but pay attention that
for every deletion, you must leave 3 row or 3 line stones for
next deleteion in another direction.( You can delete stones in
different direction.  After that,the result is either 1 or 2)

Good Luck.
It has some mistake.......Now I have changed it.
Posted by aaakkk 3 Mar 2002 19:58
Wrong................!

>          o    o
> ooo => oo  => o =>
>   o               o      <= this stone hasn't change his position
>                            but it delete 3 stones above itself.
>
> You can delete 3-line stones in this way, but pay attention that
> for every deletion, you must leave 3 row or 3 line stones for
> next deleteion in another direction.( You can delete stones in
> different direction.  After that,the result is either 1 or 2)
>
> Good Luck.