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

Обсуждение задачи 1501. Чувство прекрасного

Possible wrong example test#1
Послано Ont 6 дек 2006 08:45
Try to take as described in answer and you give this order of the cards:

for test
0011
0110
and answer
22121112 ----> 01010(11)0 (mistake!)

True possible answer is 22121121.

Am I right?
Re: Possible wrong example test#1
Послано Nechaev Ilya (Rybinsk SAAT) 6 дек 2006 18:24
I think you don't understand problem statement. Sample test is right. You don't need to make sequence like 01010101.....
Read the task again.

Edited by author 06.12.2006 18:24
Re: Possible wrong example test#1
Послано Ont 8 дек 2006 19:02
But it's just hard to understand for me...
Why example is true?  If we take card 1 than card 1 than pile with ones is lager than pile with zeros. And lager by 2 cards, not by 1! See problem - <...> At each moment the resulting piles must not differ in size by more than one card <...>
Re: Possible wrong example test#1
Послано Nechaev Ilya (Rybinsk SAAT) 8 дек 2006 23:20
See table:

zero's,      one's,       difference
---|--------
0  |      1            0                 1
1  |      1            1                 0
0  |      2            1                 1
1  |      2            2                 0
0  |      3            2                 1
1  |      3            3                 0
1  |      3            4                 1
0  |      4            4                 0

I think all is right.

Edited by author 08.12.2006 23:22
Re: Possible wrong example test#1
Послано Ont 9 дек 2006 13:28
Yes :).  I was very stupid....
Many sanks, now i will try to solve it.