Description of the mistake in the format of the sample input
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
really?
Re: Description of the mistake in the format of the sample input
I disagree. Order of input data is absolutely correct.
Re: Description of the mistake in the format of the sample input
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
I did as he told and got AC, too.
Re: Description of the mistake in the format of the sample input
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
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
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
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
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.