两圆相交面积 为什么总是wa?两圆相交面积 时间限制(普通/Java):1000MS/10000MS 运行内存限制:65

两圆相交面积 为什么总是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.000n");
else if(r=0||r==r1-r2)
printf("%.3fn",q*r2*r2);
else if(r=0||r==r2-r1)
printf("%.3fn",q*r1*r1);
else if(r>fabs(r1-r2)&&r
小绒绒 1年前 已收到1个回答 举报

xx 幼苗

共回答了26个问题采纳率:84.6% 举报

这个太高深了

1年前

5
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.014 s. - webmaster@yulucn.com