ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1638. Bookworm

Bahturin Alexander (SibSUTI) I can't understand the problem's statement [5] // Problem 1638. Bookworm 11 Oct 2008 13:32
If the worm starts from the first sheet of the first volume and finishes at the last one of the second volume, how could the answer for the sample input be 2, given that the thikness of the book (not including the cover) is 10?
Aisenshtein Daniil Re: I can't understand the problem's statement // Problem 1638. Bookworm 11 Oct 2008 14:24
No comments
Samsonov Ivan Re: I can't understand the problem's statement [1] // Problem 1638. Bookworm 13 Oct 2008 13:05
Worm can move both left and right. Stop for a while and think about it.
In some languages, the "first page" of a book is on the left side of the book when the book is placed on a shelf.   In which case "10 1 1 2" == 22.
german_goncharov Re: I can't understand the problem's statement // Problem 1638. Bookworm 16 Apr 2019 20:45
Just take two books and try - you will find answer immediately
Sultana Razia Re: I can't understand the problem's statement // Problem 1638. Bookworm 5 Oct 2020 18:46
I fully agree with you.How could the answer for sample input be 2.