Problem regarding output

Given n points. And their sorted y-x and y+x values in vector p1 and p2. How does this code computes the maximum of minimum distance of every point.
FOI(i,0,n-2)
{
lli x1,y1,x2,y2;
x1=p1[i].s.f;
y1=p1[i].s.s;
x2=p1[i+1].s.f;
y2=p1[i+1].s.s;
ans=min(ans,abs(y2-y1+x1-x2));
x1=p2[i].s.f;
y1=p2[i].s.s;
x2=p2[i+1].s.f;
y2=p2[i+1].s.s;
ans=min(ans,abs(y2+x2-y1-x1));
}

Solved on whatsapp personal

1 Like

Thank You Sir. Your help is very much appreciated. I was able to solve this problem.

1 Like