#include #include int main(void){ int i, j; int N, X[100000]; int min, tmp; min = 0x7FFFFFFF; scanf("%d", &N); for(i = 0 ; i < N; i++){ scanf("%d", &X[i]); for(j = 0; j < i; j++){ tmp = abs(X[j] - X[i]); if(tmp != 0){ if(min > tmp) min = tmp; } } } printf("%d\n", min); return 0; }