#include #include #include #define REP(i,a) for(i=0;i>n; vector v; int i,x; REP(i,n){ cin>>x; v.push_back(x); } sort(v.begin(),v.end()); int min=1000000; REP(i,v.size()-1){ if(min>v[i+1]-v[i]){min=v[i+1]-v[i];} } cout << (min=1000000?0:min) << endl; return 0; }