Wrong answer on C code Obstacle Course

c
easy
obstacle
practice
wrong-answer

#1

The desired output is obtained on my computer and http://www.compileonline.com
(GNU GCC version 4.8.1) but Codechef gives wrong answer
Please assist me to find the problem
This is the source code

header files used
stdio.h
and
math.h

code:

int main()
{

int t,n,i,j;

float max[500],min,r[2],x[500],s[500],d[500];

scanf("%d",&t);

while(t>0)

{
for(i =0;i<2;++i)

{
scanf("%f",&r*);

}

scanf("%d",&n);

for(i=0;i<n;++i)

{s*=0;

for(j=0;j<2;++j)

{

scanf("%f",&x*);

s*+=(x**x*);

}

d*=sqrt(s*);

if(d*-r[0]>r[1]-d*)

{

max*=d*-r[0];

}

else max*=r[1]-d*;

}
   if(max[0]>max[1])
   {
   min=max[1];
	  }
   else
  {
  min=max[0];
   }
for(i=2;i<n;++i)

{if(max*<min)
 {
     min=max*;
 }
   else
    {continue;
    }
}

printf("%.3lf",min);
t–;}

return 0;
}

The input:
1

5 10
3
6 0
5 7
-2 -7

The Output required:
2.720