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

Обсуждение задачи 1134. Карты

SEE THE PROBLEMS
Послано sultan 19 авг 2002 15:16
what will be the answer of
the following
and please let me know why
1) 1 2 -1 3
2) 1 2 0 4
3) -1 -2 3 0
You haven't understood the problem..see here :)
Послано Vladimir Milenov Vasilev 20 авг 2002 17:46
Hi!
This problem is not very hard, if you understand it. So, the cards
are numerated in this way:
the first card has 0 and 1 on it's two sides, the second has 1 and 2,
the third has 2 and 3...and so on..the n-th card has n-1 and n on its
both sides - all the numbers are positive!!!!
So, the your first and third  tests are incorect - such an input will
not ocure, and the answer for the second is YES, because:
First NICK has taken the second card(with numbers 1 and 2), after
that the third card(with numbers 2 and 3), after that the first card
(with numbers 0 and 1) and on the end the forth card(with numbers 4
and 5). See that he says one of the two numbers writen on the card
and each card is taken no more than once!
I hope, this will help :)
Bye!
from Vlado