签到题
能到达的距离是|l1-l2|~|l1+l2|
#include<stdio.h>
#include<math.h>
int main()
{
int l1,l2;
scanf("%d %d",&l1,&l2);
int min=l1-l2>0?l1-l2:l2-l1; //使min为非负
int max=l1+l2;
int T;
scanf("%d",&T);
double x,y,d2;
while(T--)
{
scanf("%lf %lf",&x,&y);
d2=x*x+y*y;
if(d2<min*min)
printf("%.8lf\n",min-sqrt(d2));
else if(d2>max*max)
printf("%.8lf\n",sqrt(d2)-max);
else
printf("0.00000000\n");
}
return 0;
}