Hello, everyone.
Just wanted to summarize some info about this problem.
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.