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.
Two double number l (the length of the square’s side) and d (the distance of two hearts’ corners).
One double number:the common area of the two hearts rounded to 3 digits to the right of the decimal point.