#include #include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)<>N;//[1,10^5] int x[(int)1e5]; rep(i,N){ cin>>x[i]; } sort(x,x+N); int lmin = 0; int temp; rep(i,N-1){ if(x[i] != x[i+1]){ temp = x[i+1] - x[i]; if(lmin == 0 || temp < lmin){ lmin = temp; } } } P(lmin); return 0; }