1021 - Common area of two hearts

Time Limit : 1 Second

Memory Limit : 128 MB

Submission: 34

Solved: 2

Description
We define heart shape as follows:



It is made up by a square and two semicircle.The length of the square’s side is l.And the diameter of semicicle is also l.The square’s sides are awalys make 45 degrees with x axes.And the corner (the lowest point of heart shape ) is awalys on the x axes. Now give you two heart shapes with the same size,your task is to determine the common area of the two hearts.
Input
Two double number l (the length of the square’s side) and d (the distance of two hearts’ corners).
Output
One double number:the common area of the two hearts rounded to 3 digits to the right of the decimal point.
sample input
100 200
sample output
0.000
hint
source
cjq
© 2015 HUST ACMICPC TEAM. All Right Reserved.