Overlapping discsProblem code: M5 |
All submissions for this problem are available.
You are given n discs on plane, of the same radius (r=1). Output the area of the part of the plane which is covered by each disc.
Input
First, 1<=t<=10, the number of tests. Each testcase is of the following form: 1<=n<=100000, then n pairs of floating point coordinates follow: -1000<=xi,yi<=1000, representing the location of the i-th disc.
Output
For each testcase, output the total area covered by the intersection of all discs. Round the answer to 6 decimal digits after the point.
Example
Input: 1 2 0 0 0 1 Output: 1.228370
| Date: | 2010-01-29 |
| Time limit: | 2s-5s |
| Source limit: | 50000B |
| Languages: | All except: TCL |
Comments
Loading Comments...
SUCCESSFUL SUBMISSIONS FOR THIS PROBLEM:
Loading Submissions...RECENT ACTIVITY FOR THIS PROBLEM:
Loading Recent Activity...HELP
Program should read from standard input and write to standard output.
After you submit a solution you can see your results by clicking on the [My Submissions] tab on the problem page. Below are the possible results:
- Accepted
Your program ran successfully and gave a correct answer. If there is a score for the problem, this will be displayed in parenthesis next to the checkmark. - Time Limit Exceeded
Your program was compiled successfully, but it didn't stop before time limit. Try optimizing your approach. - Wrong Answer
Your program compiled and ran succesfully but the output did not match the expected output. - Runtime Error
Your code compiled and ran but encountered an error. The most common reasons are using too much memory or dividing by zero. For the specific error codes see the help section. - Compilation Error
Your code was unable to compile. When you see this icon, click on it for more information.
If you are still having problems, see a sample solution here.
