ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1520. Empire Strikes Back

how to
Posted by nttjuvwamsncc 14 Feb 2007 14:35
how to solve it ???
Re: how to
Posted by svr 20 Mar 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
Posted by Denis Koshman 30 Aug 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.