May Long (WTBTR)

We have to answer (A multiplied sqrt(2)) and If you see the calculation when we transform there is a sqrt(2) in denominator. It gets cancelled and then what we have is the required answer.

Rajat,
Can you please tell me how you’ve arrived at this conclusion.Like a proof or something.
Thanks in Advance

It seems to me that the test cases are broken.
I did by:
Rotate coordinates; can ignore \sqrt 2 factor here as it cancels, so affine transform to (x+y,x-y) \equiv (X,Y).
Now sort these separately by X and Y. Min(minimum difference of X, and that of Y) is double the answer. However I’m getting only 10 points. Tried setprecision, even long double even though inputs are small enough to fit in double. I think testcases are broken.