ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

## Discussion of Problem 1030. Titanic

Posted by Olzhas aka Whale2dy 30 Mar 2007 05:23
Hello, everyone.
Ok, my code got AC with following things in it:
1. My pi was 3.1415926535897932384626433 (perhaps it is enough)
2. I used this formula from wikipedia
deltaArc=acos(sin(phiA)*sin(phiB)+cos(phiA)*cos(phiB)*cos(deltaL));
distance = deltaArc*3437.5;
(see the first formula from wikipedia http://en.wikipedia.org/wiki/Great-circle_distance)
3. I used the following condition:
if(100.00-distance>0.005) printf("DANGER!\n");
Hope it will help somebody.
Posted by Javran 14 Oct 2007 16:35
thanks a lot ...your formula is really useful.^_^
Posted by Lomir 11 Nov 2007 02:13
Used everynth what is written here. However still WA8.
Any new ideas?...
Posted by Hakkinen 26 Jan 2009 16:34
kiitos
Posted by Imran Yusubov 13 Aug 2009 17:01