You will be given N pair of coordinates on a 2D space. You will determine distance between the closest pair of points.
The distance between any two points is calculated as:
The input will start with N (1≤N≤1000), the number of coordinates. Then N lines will follow, each with a pair of integers Xi and Yi (−1000≤Xi,Yi≤1000) representing the x and y coordinates of the points.
Print the distance between the closest pair from among the given points. Absolute or relative error greater than 10−4 will be ignored.
The two closest points are (2,7) and (3,5). The distance between these two points is 2.23606797749979.