ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1051. Простая игра на сетке

Why is the solution...
Послано Stefan Ciobaca 3 мар 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
Послано aaakkk 3 мар 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.
Послано aaakkk 3 мар 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.