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

Обсуждение задачи 1956. Сигнальные костры

who can explain me this problem?
Послано Mattiev Jamol 16 июн 2013 11:12
I couldn't understand this problem perfectly.
Re: who can explain me this problem?
Послано Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 16 июн 2013 15:53
The problem is to draw a line on the plane such that sum of distances from all points in the input to this line is minimum. And you should output this minimum number - that's all
Re: who can explain me this problem?
Послано Mattiev Jamol 16 июн 2013 16:32
do you explain for this test  and add one test to be understandable please?
why the answer is 1.414214


Edited by author 16.06.2013 16:34
Re: who can explain me this problem?
Послано Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 16 июн 2013 22:22
I'm sorry, but my explanation should be more than clear. If you don't understand - study math harder (or maybe English)
Re: who can explain me this problem?
Послано Sandro (USU) 17 июн 2013 12:01
In the example from the problem statement you should draw a line x - y = 0.
So, the distance from (0, 0) is 0, from (0, 1) is sqrt(2)/2, from (1, 1) is 0, from (1, 0) is sqrt(2)/2. The sum of all distances is sqrt(2).
Re: who can explain me this problem?
Послано Mattiev Jamol 18 июн 2013 11:15
I understood. thanks alot! what is the best alghoritm to solve this problem

Edited by author 18.06.2013 11:58