#include<stdio.h>
#include<math.h>
float mul(int x1,int y1,int x2,int y2,int x3,int y3)
{
float k;
k=(x1*y2-x2*y1+x2*y3-x3*y2+x3*y1-x1*y3)/2.0;
return k;
}
int dis(int x0,int y0,int x1,int y1)
{
int m=(x0-x1)*(x0-x1)+(y0-y1)*(y0-y1);
return m;
}
int main()
{
int x0,y0,n,i,j,count;
double R;
while(scanf("%d%d%lf",&x0,&y0,&R),R>0)
{
scanf("%d",&n);
int a[150][2];
int b[150];
for(i=0;i<n;i++)
for(j=0;j<2;j++)
scanf("%d",&a[i][j]);
for(i=0;i<n;i++)
{
count=0;
if(dis(x0,y0,a[i][0],a[i][1])>R*R)
{
b[i]=count;
break;
}
else
{
for(j=0;j<n;j++)
{
float l=mul(x0,y0,a[i][0],a[i][1],a[j][0],a[j][1]);
int d=dis(x0,y0,a[j][0],a[j][1]);
if(l<=0&&d<=R*R)
count++;
}
b[i]=count;
}
}
int max=b[0];
for(i=0;i<n;i++)
{
if(b[i]>max)
max=b[i];
}
printf("%d\n",max);
}
return 0;
}
错误点在哪里呀,求答案