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

Обсуждение задачи 1332. Джинн-бомбардировки

WA10 help
Послано Giorgi Saghinadze (Tbilisi SU) 28 фев 2007 21:57
I have WA 10.
I think I can't find coordinates center of circle very well. I think I have presision error. because in my solution I use numbers which maybe become larger than maxlongint;

if we have points. x1,y1 and x2,y2 and they are located at circle. how we can find coordinates cenrte of circle ?

sorry for my bad English
Re: WA10 help
Послано Kit 1 мар 2007 00:09
There are great number of ways to define circle by two points on it. One of these: (x1 + x2)/2, (y1 + y2)/2, isn't it :)
Re: WA10 help
Послано Giorgi Saghinadze (Tbilisi SU) 1 мар 2007 00:40
Kit писал(a) 1 марта 2007 00:09
One of these: (x1 + x2)/2, (y1 + y2)/2, isn't it :)
yes of course. but I missed one thing. radius should be fixed.
we have points at circle x1,y1,x2,y2 and r. find the centre point of cirle which radius is r. :)
 how can I do it?
Re: WA10 help
Послано Kit 1 мар 2007 01:43
For example, you can consider isosceles triangle (two original points and center). You can also solve two equations: dist(p, p1) = r and dist(p, p2) = r in coordinats (but I think first way is simpler).