Triangle and Circle
Very hard
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Do you enjoy tackling geometric challenges?
If so, try determining the intersection area between a circle and a triangle on a plane.
Input
The first line provides x_0, y_0, r_0—representing the center coordinates and radius of the circle. The second line lists x_1, y_1, x_2, y_2, x_3, y_3—the coordinates of the triangle's vertices. All input numbers are positive integers and do not exceed 100.
Output
Output a single number representing the area of the intersection between the circle and the triangle, ensuring an absolute or relative error precision of 10^{-6}.
Examples
Input #1
Answer #1
Submissions 11