CF600D.Area of Two Circles' Intersection
普及+/提高
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given two circles. Find the area of their intersection.
给你两个圆,求它们的交集面积。
输入格式
The first line contains three integers _x_1, _y_1, _r_1 ( - 109 ≤ _x_1, _y_1 ≤ 109, 1 ≤ _r_1 ≤ 109) — the position of the center and the radius of the first circle.
The second line contains three integers _x_2, _y_2, _r_2 ( - 109 ≤ _x_2, _y_2 ≤ 109, 1 ≤ _r_2 ≤ 109) — the position of the center and the radius of the second circle.
第一行包含三个整数 x1、y1、r1(−109≤x1,y1≤109,1≤r1≤109)—— 表示第一个圆的圆心坐标及其半径。
第二行包含三个整数 x2、y2、r2(−109≤x2,y2≤109,1≤r2≤109)—— 表示第二个圆的圆心坐标及其半径。
输出格式
Print the area of the intersection of the circles. The answer will be considered correct if the absolute or relative error doesn't exceed 10 - 6.
输出两圆交集的面积。若绝对误差或相对误差不超过 10−6,则答案视为正确。
输入输出样例
输入#1
0 0 4 6 0 4
输出#1
7.25298806364175601379
输入#2
0 0 5 11 0 5
输出#2
0.00000000000000000000
输入解题思路,AI测评打分。不知道怎么写?