Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
Register

## 我这个为什么是WA啊~~~~~ 55555555555555

Posted by chris2007_1984 at 2004-10-18 21:49:28 on Problem 1927
```#include "stdio.h"
#include "math.h"

#define pi 3.1415926

double tri[3];
double role,perimeter,halfp;
double area,max,mius;
double R,r;
int counter = 0;

int main()
{
while (1)
{
counter++;
max = 0;
scanf("%lf %lf %lf %lf",tri+0,tri+1,tri+2,&role);
if(*(tri+0) == 0)
break;
perimeter = tri[0]+tri[1]+tri[2];
halfp = perimeter/2;
area = sqrt(halfp*(halfp-tri[0])*(halfp-tri[1])*(halfp-tri[2]));
R = area * 2 / (tri[0]+tri[1]+tri[2]);
if (role == perimeter)
{
max = area;
}
else
{
r = (perimeter - role) / ((perimeter / R) - (2 * pi));
mius = (r*r*perimeter)/(2*R);
max = area - mius + pi * r * r;
}
printf("Case %d: %.2lf\n",counter,max);
}
return 0;
}```

Followed by: