#include #include #include using namespace std; typedef long double LD; const int maxn=100005; const double oo=0x3f3f3f3f,eps=0.000001; struct Point { int x,y; bool z; }p[maxn*2]; inline bool operator<(const Point &a,const Point &b) { return a.x>1; double res=min(f(L,M),f(M,R)); for(int i=M-1;i>=L;i--) { if(p[M].x-p[i].x+eps>res) break; for(int j=M+1;j<=R;j++) { if(p[j].x-p[i].x+eps>res) break; res=min(res,dis(p[i],p[j])); } } return res; } inline void solve() { scanf("%d",&n); for(int i=0;i0) solve(); return 0; }