以四个顶点为圆心画圆,圆面积不能重合,求四个圆的直径和最大是多少。
#define _CRT_SECURE_NO_WARNINGS #include<string.h>
#include<stdio.h>
#include<math.h>
#include<algorithm>
using namespace std; double minn(double a,double b,double c)
{ a=a<b? a:b;
a=a<c? a:c;
return a;
}
int main()
{
double x[],y[],l[];
while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x[],&y[],&x[],&y[],&x[],&y[],&x[],&y[])!=EOF)
{
l[]=(x[]-x[])*(x[]-x[])+(y[]-y[])*(y[]-y[]);
l[]=(x[]-x[])*(x[]-x[])+(y[]-y[])*(y[]-y[]);
l[]=(x[]-x[])*(x[]-x[])+(y[]-y[])*(y[]-y[]);
l[]=(x[]-x[])*(x[]-x[])+(y[]-y[])*(y[]-y[]);
l[]=(x[]-x[])*(x[]-x[])+(y[]-y[])*(y[]-y[]);
l[]=(x[]-x[])*(x[]-x[])+(y[]-y[])*(y[]-y[]);
printf("%.8lf\n",minn(sqrt(l[])+sqrt(l[]),sqrt(l[])+sqrt(l[]),sqrt(l[])+sqrt(l[])));
}
return ;
}