eolymp
bolt
Try our new interface for solving problems
Problems

Intersection

Intersection

Write a program that computes the area of intersection of the circle and a square with sides parallel to the axes. \InputFile The first line contains three numbers, separated by space - the coordinates of the center of the circle\textbf{X_0} and \textbf{Y_0}) and radius of the circle \textbf{R}. The second row contains three numbers, separated by space - the coordinates of the lower left corner (\textbf{X} and \textbf{Y}) and the size of the square \textbf{S}. All numbers are in the range of \textbf{1} to \textbf{20}. \OutputFile Display single number - the area of intersection of the circle and square with two decimal signs.
Time limit 1 second
Memory limit 64 MiB
Input example #1
5.0 2.0 1.0
3.5 2.0 3.0
Output example #1
1.57