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 1159. Fence

Posted by Mukhametianov Den [USU] 28 Aug 2010 19:10
infin = 100000000 - wa14.
infin = 1000000 - ac.
Re: Funny.
Posted by Sergey Lazarev (MSU Tashkent) 4 Jan 2011 23:45
Thank you!
But it's very strange. I found the radius using bin search. The right border for search was the sum of all lengths - it must be greater than radius. And I've got WA 14. After changing right border to 10^6 I've got AC.
Re: Funny.
Posted by Chitanda Eru 17 Mar 2017 15:32
If you try to check a very big radius, the parameter of arcsin gets very low. I assume the function just returns its parameter if it's very close to 0 but your eps needs to be very low as well.

Also, the raduis of a polygon's circumscribed circle can be infinitely large no matter what's the upper boundary for its sides is. In this problem, there is a lower boundary too, so you can actually limit your binary search with something.