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

Обсуждение задачи 1638. Книжный червь

Description of the mistake in the format of the sample input
Послано Bahturin Alexander (SibSUTI) 11 окт 2008 13:40
The correct format of the input is:
<width of the book w/o the cover>
<width of the cover>
<number of the book where the worm _finishes_>
<number of the book where the worm _starts_>

(so, the last two were just given in the incorrect order)
Re: Description of the mistake in the format of the sample input
Послано chobits 11 окт 2008 13:43
really?
Re: Description of the mistake in the format of the sample input
Послано Ekvilon 11 окт 2008 14:07
I disagree. Order of input data is absolutely correct.
Re: Description of the mistake in the format of the sample input
Послано Bahturin Alexander (SibSUTI) 11 окт 2008 16:30
So whould you mind explaining me the 'Sample output'?
I treated the input as I wrote above and got AC..
Re: Description of the mistake in the format of the sample input
Послано spNautilus 11 окт 2008 17:23
I did as he told and got AC, too.
Re: Description of the mistake in the format of the sample input
Послано Vedernikoff Sergey (HSE: EconomicsForever!) 11 окт 2008 18:14
You are wrong, guys. Input format is correct. You're lucky that ACed the problem without thinking about it. Think - and you'll find out that input specification is indeed correct - it's a very famous logical puzzle =)
Re: Description of the mistake in the format of the sample input
Послано Anisimov Dmitry (Novosibirsk STU) 12 окт 2008 20:11
The input format is entirely correct.
The problem requires knowledge about how REAL books are USUALLY placed on shelves.
The problem is very old trick really. I am sure many of contestants were already familiar with it (I was).

Edited by author 12.10.2008 20:12

Edited by author 12.10.2008 20:12
Re: Description of the mistake in the format of the sample input
Послано Bahturin Alexander (SibSUTI) 14 окт 2008 00:26
So.. Do you (all of you who says that input format is correct) mean that books are stored in a way that the last page is the leftmost one? If so than it's not surprising that the solution which swaps numbers of the books gets AC.
Re: Description of the mistake in the format of the sample input
Послано Dr Zhihua Lai 29 авг 2011 17:05
yes, just imagine.
when you place books on the shelf, the books are facing inwards, which means, the first page is on the right and the last page is on the left.
Re: Description of the mistake in the format of the sample input
Послано Bogatyr 15 окт 2012 22:34
Hah, I wasn't familiar with this particular trick, but I've done enough of the "simple" problems on Timus now to know that many problems derive their difficulty not from the underlying algorithm, but in correctly understanding problem statements which are sometimes tricky, ambiguous, or rely on unstated assumptions (like this one, assuming how people "normally" put books on shelves, and which side of the book contains the first page).

So I'm learning to always ask "what's the catch?" and got AC first time on this one (after initial WA on many other "simple" problems).   So solving Timus problems is successfully training me to read problems very carefully!
Re: Description of the mistake in the format of the sample input
Послано BillSu 27 апр 2014 13:04
If you are really smart, try the problems not one get AC before, otherwise get the hell out of your pretentious mask.