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

Discussion of Problem 1705. Gangster Hares

Posted by Wang Jia 11 Apr 2009 21:59
maybe the problem can be abstracted as the following one:

n,m are integers, n given, find the smallest m such that [n/m]==[n/(m+1)] holds, where [] denotes the floor() function.

well, anyone has any ideas?
Re: [n/m]==[n/(m+1)]
Posted by NickSergeev[MSU MindCraft] 2 Aug 2009 18:21
Yes, it's redefinition of problem.
Re: [n/m]==[n/(m+1)]
Posted by Wang Jia 22 Aug 2009 13:38
but how can i find such an m? a binary search does seems not to work...
Re: [n/m]==[n/(m+1)]
Posted by Fly [Yaroslavl_SU] 25 Nov 2009 02:21
The binary search works. But it isn't a binary search by the answer. ;)
Re: [n/m]==[n/(m+1)]
Posted by Tolstobrov Anatoliy[Ivanovo SPU] 29 Dec 2014 20:39
I use binary search of answer in range Sqrt(n) and Sqrt(n) + Sqrt(Sqrt(n))