Hi.......really this one is tough

any help plz? i m getting WRONG ANSWER.

A lot actually

Code: Select all

```
#include<cstdio>
#include<cmath>
struct point
{
double x,y;
};
point p[10];
int n;
double area(point a,point b,point c)
{
double area;
area=a.x*(b.y-c.y)+b.x*(c.y-a.y)+c.x*(a.y-b.y);
return 0.5*fabs(area);
}
int main()
{
double sum,pt,r,t,total,pi=2*acos(0.0);
int k;
// freopen("in.in","r",stdin);
while(scanf("%d",&n)==1 && n)
{
total=0;
for(k=0;k<n;k++)
{
scanf("%lf%lf%lf%lf%lf",&pt,&p[0].x,&p[0].y,&p[1].x,&p[1].y);
sum=0;
while(scanf("%lf%lf",&p[2].x,&p[2].y) && (p[2].x!=p[0].x || p[2].y!=p[0].y))
{
sum+=area(p[0],p[1],p[2]);
p[1]=p[2];
}
total+=pt*sum;
}
scanf("%lf%lf",&r,&t);
printf("%.0lf\n",floor(total/(pi*r*r*t)));
}
return 0;
}
```