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

Обсуждение задачи 1520. Империя наносит ответный удар

how to
Послано nttjuvwamsncc 14 фев 2007 14:35
how to solve it ???
Re: how to
Послано svr 20 мар 2008 11:48
I think that enough  for each circle-boundary to be
covered by others circles
or we have covering problem of arc by given set of arcs.

Have Ac based on this idea.

1504 ac with the same idea but
many hard work with eps.

Main difficult moment:
ends of arcs computed with help of arcos
have error with respect to exact values and may be
greater or smaller of them , but exact values of boundaries of intervals lies in distance eps=1.e-16 from computed values.


Edited by author 22.03.2008 17:50
Re: how to
Послано Denis Koshman 30 авг 2008 05:41
It's Vorony diagrams problem. Of course, you may solve it via covering all arcs of all circles or even try binary search on radius.

2svr: as for comparing arcs - why do you need angles? Just keep x/y pairs defining direction and compare these pairs for <, =, > of angles they define. One of easy easy ways to do that:
y>0 || y==0 && x>0 - 1st part [0;pi)
y<0 || y==0 && x<0 - 2nd part [pi;2pi)

if 2 vectors belong to different parts, you alredy know which angle is smaller. If not, check sign of their cross product.