#include #include #include using namespace std; int main() { int n, x; cin >> n; int d = 1000010, tmp = -1000010; for(int i=0; i> x; if(tmp != x) d = min(d, abs(x - tmp)); tmp = x; } cout << d << endl; return 0; }