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

Обсуждение задачи 1294. Марсианские спутники

Do I miss some conditon, or maybe I have some extra's
Послано Marko Bogdanovic 11 май 2005 04:05
My formula is probably ok., I think I get WA because of special conditions so here is what I check:

1. ad*ac-bd*bc == 0 => impossible, because we can't divide with zero.
2. ad*bc+ab*cd != ac*bd => impossible, because than orbit is not circle, according to Phtolomei's theorem
3. final score is cd=sqrt(formula), where "formula" is my math solution without root, so I check if formula<0, because there is no root of negative value.

Do I miss some conditon here (for some input value of ad, ac, bc, bd maybe?), or maybe I have some conditon that I don't need??
Please help me here!

Edited by author 11.05.2005 04:07
Re: Do I miss some conditon, or maybe I have some extra's
Послано Burunduk1 11 май 2005 09:51
In my AC solution I didn't use the second condition.
In what type you store data? int, int64, double?
Re: Do I miss some conditon, or maybe I have some extra's
Послано Marko Bogdanovic 12 май 2005 03:22
I store data in double and int, I have  few conversion double->int and oposite. Do I need __int64 or long double?
Re: Do I miss some conditon, or maybe I have some extra's
Послано Burunduk1 12 май 2005 04:13
In my AC program I used only double.
Try to change all int to double.
Re: Do I miss some conditon, or maybe I have some extra's
Послано Marko Bogdanovic 13 май 2005 00:33
Perhaps my formula is wrong, here it is :
(I used characteristics of inscribed ugle and cosin theorem)
cd = (ad*ad + ac*ac - (ad*ac*bd / bc) - (ad*ac*bc / bd)) /
      ( 1 - (ad*ac / (bd*bc)));
cd = sqrt(cd);
Maybe this exspression where I divide (1 - (ad*ac / (bd*bc)) is not good for some input data because I forbid divide with zero?

Edited by author 13.05.2005 00:36

Edited by author 13.05.2005 04:45
this problem cos_a can be > 1
Послано Виктор Крупко 13 май 2005 01:50
1. ad*ac-bd*bc == 0 => impossible, because we can't divide with zero.
2. ad*bc+ab*cd != ac*bd => impossible, because than orbit is not circle, according to Phtolomei's theorem
3. final score is cd=sqrt(formula), where "formula" is my math solution without root, so I check if formula<0, because there is no root of negative value.

1 yes
2 no
3 Through system of the equations express cos_a, and then find the side.
No subject
Послано Fly [Yaroslavl_SU] 11 окт 2005 13:12
Why if ad*ac-bd*bc==0 it's impossible? In some place it is really impossible, but not for test:
1 2 2 1
I can select any length from interval (1,3) and it should be right answer!
It's not impossible, but in this case it *is* impossible to determine DC unambiguously, so the anwer is "Impossible." (-)
Послано Michael Rybak (accepted@ukr.net) 10 фев 2006 16:48
-