ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1030. Титаник

Olzhas2dy Some info about this problem [10] // Задача 1030. Титаник 30 мар 2007 05:23
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.
Javran Re: Some info about this problem // Задача 1030. Титаник 14 окт 2007 16:35
thanks a lot ...your formula is really useful.^_^
Lomir Re: Some info about this problem // Задача 1030. Титаник 11 ноя 2007 02:13
Used everynth what is written here. However still WA8.
Any new ideas?...
Sihang Re: Some info about this problem [3] // Задача 1030. Титаник 26 янв 2009 16:34
kiitos
Imran Yusubov Re: Some info about this problem // Задача 1030. Титаник 13 авг 2009 17:01
Thanks in advance!!
Imran Yusubov Re: Some info about this problem // Задача 1030. Титаник 13 авг 2009 17:01
Thanks in advance!!
Imran Yusubov Re: Some info about this problem // Задача 1030. Титаник 13 авг 2009 17:01
Thanks in advance!!
Xan Tei Jun Re: Some info about this problem // Задача 1030. Титаник 26 окт 2009 13:03
Thanx for your hint
Bumstern Re: Some info about this problem [2] // Задача 1030. Титаник 23 сен 2018 13:18
Do u know that pi can be calculated by this formula: atan(1) * 4?
Solver Re: Some info about this problem [1] // Задача 1030. Титаник 14 июл 2026 07:12
acos(-1)
Solver Re: Some info about this problem // Задача 1030. Титаник 14 июл 2026 07:37
Also if you use acos on dot-product to get distance over sphere, beware that acos(-1.000000001) or acos(+1.000000001) will give NaN, so clamp argument to [-1, +1] range explicitly.