#include<stdio.h>
double min(double x,double y)
{
if(x>y) return y;
else return x;
}
double max(double x,double y)
{
if(x>y) return x;
else return y;
}
int main()
{
double x1,x2,x3,x4,y1,y2,y3,y4,x,y,p,q,s;
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
x=max(min(x1,x2),min(x3,x4));
y=min(max(y1,y2),max(y3,y4));
p=min(max(x1,x2),max(x3,x4));
q=max(min(y1,y2),min(y3,y4));
if(x>p||y<q)
s=0;
else
s=(p-x)*(y-q);
printf("%.2f",s);
return 0;
}
为什么在蓝桥杯练习系统上一直显示运行错误,哪里错了啊?呜