#include using namespace std; #include struct UF{ int n; vectorparent,rank; UF(int n_=0):n(n_),parent(n_),rank(n_,1) { for(int i=0;i>N; for(int i=0;i>x[i]>>y[i]; long L=0,R=2e9; while(R-L>1) { long M=(L+R)/2; UF uf(N); for(int i=0;i