using namespace std; #include #define BEGIN ios_base::sync_with_stdio(0);cin.tie(0); #define END return EXIT_SUCCESS; #define INF 1000007 #define FOR(I,A,B) for(int (I)=(A);(I)<(B);++(I)) #define ALL(C) (C).begin(),(C).end() inline void solve() { int N;cin>>N; vectorX(N);int A=INF; FOR(i,0,N)cin>>X[i]; sort(ALL(X)); FOR(i,0,N-1) { if(X[i+1]==X[i])continue; A=min(A,X[i+1]-X[i]); } if(A==INF)cout<<0<