Easy Geometry > Basic Geometry

Given two points in 2d space, find the size of the largest square that can be drawn centered at those points such that, the squares do not intersect ( they may touch each other but must not intersect ) Here center of a square is the point from which every side is equidistant. Input: ------ First line will contain an integer, the number of test cases <= **10000**. Each test contains four nonnegative integer **xA, yA, xB, yB**. (xA,yA) is the co ordinate of point A and (xB,yB) is the coordinate of point B. Integers representing the coordinates will be <= **9*10^18** Output: ------- For each case print one integer, the side length of the **largest axis parallel squares centered at A and B** satisfying the property mentioned earlier. Sample Input ------------ 1 1 1 1 1 Sample Output ------------- 0

Mehdi Rahman