cant identify the error in the code

#include<stdio.h>
#include<math.h>
int main()
{
int r,R,n,T,i,j,x[20],y[20];
float o[20],d[20],test;
scanf("%d",&T);
for(j=0;j<T;j++)
{

scanf("%d %d",&r,&R);
scanf("%d",&n);
for(i=0;i<n;i++)
{
    scanf("%d %d",&x[i],&y[i]);
}
for(i=0;i<n;i++)
{
    o[i]=(float)sqrt((float)x[i]*(float)x[i]+(float)y[i]*(float)y[i]);
}
test=(float)r+((float)(R-r)/2);
for(i=0;i<n;i++)
{
    if(o[i]<test)
    {
        d[i]=R-o[i];
    }
    else
        d[i]=o[i]-r;

}
for(i=1;i<n;i++)
{
    if(d[0]<d[i])
        d[0]=d[i];
    else
        continue;
}
printf("%.3f",d[0]/2);
}
return 0;

}

If u want someone to help you gotta help us by telling what u are trying to do. Whats the question?

Did you compile with -lm parameters (if on GCC)?

More details could help us. Exact error, problem no., etc.

//