Tell me the area

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 1798
64-bit integer IO format: %I64d      Java class name: Main

Description

    There are two circles in the plane (shown in the below picture), there is a common area between the two circles. The problem is easy that you just tell me the common area.

Input

There are many cases. In each case, there are two lines. Each line has three numbers: the coordinates (X and Y) of the centre of a circle, and the radius of the circle.

Output

For each case, you just print the common area which is rounded to three digits after the decimal point. For more details, just look at the sample.

Sample Input

0 0 2
2 2 1

Sample Output

0.108

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .