两圆相交面积 为什么总是wa?两圆相交面积 时间限制(普通/Java):1000MS/10000MS 运行内存限制:65536KByte总提交:404 测试通过:112 描述There are two circles in the plane (shown in the below picture),there is a common area
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 07:52:08
两圆相交面积 为什么总是wa?两圆相交面积 时间限制(普通/Java):1000MS/10000MS 运行内存限制:65536KByte总提交:404 测试通过:112 描述There are two circles in the plane (shown in the below picture),there is a common area
两圆相交面积 为什么总是wa?
两圆相交面积
时间限制(普通/Java):1000MS/10000MS 运行内存限制:65536KByte
总提交:404 测试通过:112
描述
There are two circles in the plane (shown in the below picture),there is a common area between the two circles.The problem is easy that you just tell me the common area.
输入
There are many cases.In each case,there are two lines.Each line has three numbers:the coordinates (X and Y) of the centre of a circle,and the radius of the circle.
输出
For each case,you just print the common area which is rounded to three digits after the decimal point.For more details,just look at the sample.
样例输入
0 0 2
2 2 1
样例输出
0.108
#include
#include
int main()
{
\x05double a,s,d,f,z,x,ss,jiao1,jiao2,l1,l2,r,r1,r2,q=acos(-1);
\x05while(scanf("%lf%lf%lf",&a,&s,&r1)!=EOF)
\x05{ \x05 scanf("%lf%lf%lf",&z,&x,&r2);
r=sqrt((a-z)*(a-z)+(s-x)*(s-x));
if(r>r1+r2||r==r1+r2)
printf("0.000\n");
else if(r=0||r==r1-r2)
printf("%.3f\n",q*r2*r2);
else if(r=0||r==r2-r1)
printf("%.3f\n",q*r1*r1);
else if(r>fabs(r1-r2)&&r
两圆相交面积 为什么总是wa?两圆相交面积 时间限制(普通/Java):1000MS/10000MS 运行内存限制:65536KByte总提交:404 测试通过:112 描述There are two circles in the plane (shown in the below picture),there is a common area
这个太高深了