CLOPPAIR  Closest Point Pair
You are given N points on a plane and your task is to find a pair of points with the smallest euclidean distance between them.
All points will be unique and there is only one pair with the smallest distance.
Input
First line of input will contain N (2<=N<=50000) and then N lines follow each line contains two integers giving the X and Y coordinate of the point. Absolute value of X,Y will be atmost 10^6.
Output
Output 3 numbers a b c, where a,b (a<b) are the indexes (0 based) of the point pair in the input and c is the distance between them. Round c to 6 decimal digits.
See samples for more clarification.
Input:
5
0 0
0 1
100 45
2 3
9 9
Output:
0 1 1.000000Input:
5
0 0
4 1
7 2
4 5
1 1
Output:
0 4 1.414214
hide comments
ameernsr:
20190210 14:04:48
badihijat


tommydong:
20181215 04:27:01
I got WA on test 12. It was not just a presentation error. I was totally wrong. Perhaps the test before 12 is weak. 

yaseenmollik:
20181130 10:36:50
AC in 5 go _


pkhrag:
20180919 11:25:41
Getting TLE with n*logn algo in C++. Can anyone help? 

gooolakh:
20180825 10:43:10
What the hell if wrong with that test 12, what do you mean to use long long int?? 

k3rnelpan1c:
20180425 07:54:38
This problem isn't suitable for python. An n*logn divide and conquer algorithm will pass in c++ but get a TLE in python.


darshit05:
20171004 13:05:27
For test case 12 use std::fixed; before using std::setprecision(6); 

miaortizma:
20170820 03:46:02
12th case solved by checking my minimum (default) distance. 

bruceoutdoors:
20170819 18:01:53
also this problem was never pass with python. The time limit set is too little! 

bruceoutdoors:
20170819 17:52:06
I used double instead of long long int and still passed (?_?) 
Added by:  SALVO 
Date:  20110414 
Time limit:  0.169s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Standard Problem 