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

solution The are three formules
Posted by Michail Yudin 3 Apr 2009 16:47
when first book = last book, when first book < last book  and when last book < first book.
5 minutes to got it. its very simple;
solution at o(1); AC 0,015
Re: solution The are three formules
Posted by dAFTc0d3r [Yaroslavl SU] 25 Mar 2010 01:14
In fact we can solve it without if, just one (!) formula:
abs( ( n2 - n1 ) * ( l1 + 2 * l2 ) - l1 )
8-)
Re: solution The are three formules
Posted by S.77 7 Aug 2011 05:38
Queen Anne is dead, too.
Re: solution The are three formules
Posted by amirani 6 Sep 2011 23:47
:D easy :D only 1 formul is needed i did same as  dAFTc0d3r [Yaroslavl SU] :)