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 1729. Dead Man's Chest

Hint
Posted by JIeHuH [Yaroslavl SU] 14 Nov 2009 11:23
For accuracy of calculations use power-reduction formulas /* 2 * sin ^ 2 (a) = 1 - cos(2a) */ in the formula that calculates chords long.
Re: Hint
Posted by JIeHuH [Yaroslavl SU] 24 Nov 2009 01:51
2 * R * sin( a / 2 ) =  sqrt ( 2 R R 2 sin^2 ( a / 2 ) ) = sqrt ( 2 R R ( 1 - cos ( a ) ) = sqrt ( 2 R R - 2 R R cos ( a ) ) = sqrt ( R^2 + R^2 + 2 * R * R * cos ( a ) )