eolymp
bolt
Try our new interface for solving problems
Problems

Circular area

Circular area

\includegraphics{https://static.e-olymp.com/content/07/079deea41b3b29669719a5e21a2b238fb812471d.jpg} The two circles are given coordinates of the centers in a rectangular Cartesian coordinate system and radius. Find the area of their intersection. \InputFile In the first row there are six real numbers by a space - the coordinates of the centers and radii of two circles: \textbf{x_1}, \textbf{y_1}, \textbf{r_1}, \textbf{x_2}, \textbf{y_2}, \textbf{r_2}. All numbers are real and do not exceed \textbf{1000}. \OutputFile Print a single real number with two characters after the decimal point - the area of intersection of circles.
Time limit 1 second
Memory limit 64 MiB
Input example #1
20.0 30.0 15.0 40.0 30.0 30.0
Output example #1
608.37