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 1163. Chapaev

If you have WA16
Posted by Denis Koshman 14 Aug 2008 11:28
First of all, precision of 1e-8 is ok to get AC (with double type and without trigonometry).

Now about WA16 - that's the case when one of boundary rays is parallel to OX. When some angular segments crosses OX, I perform a split at 0/2PI point. In described case it was possible that I first delete a draught at point 0 and then add it. So, sorting should be not just angular, but also additions should precede deletions. This condition is automatic for regular cases, so I omitted it. But in described case special care should be taken.