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 1030. Titanic

Is this equation correct !? Or I should use other one!?
Posted by Krzysztof Kapuscik 27 May 2001 05:58
I've got several WA on this problem. Could somebody tell me
if I should use this equation to count :

angle = acos(cos(as)*cos(bs)*cos(ai)*cos(bi)+cos(as)*sin(bs)
*cos(ai)*sin(bi)+sin(as)*sin(ai));

where as,bs are altitude and longitude of ship, and ai,bi
of iceberg ???

And could I use this:
ang2 = [ ( (secs/60)+mins )/60 + hrs ] * PI/180
to get the radian angle from given coordinates (hh^mm'ss'')

Please help!??!
Re: Is this equation correct !? Or I should use other one!?
Posted by cosechy 4 Sep 2004 14:44
My answer:
6875*asin(sqrt((1-cos(x)*cos(a)*cos(y-b)-sin(x)*sin(a))/2))
x,y are the ship's coordinates, and a,b are the iceberg's.
Re: Is this equation correct !? Or I should use other one!?
Posted by remdy21 7 Aug 2009 10:14
i think it's right ,but my sample ans is 52.14
WHY?????????????