#include #include using namespace std; int main(){ int n; cin >> n; vector a(n); for(int a_i = 0; a_i < n; a_i++){ cin >> a[a_i]; } // your code goes here sort(a.begin(),a.end()); int minDif = abs(a[1]-a[0]); for(int i = 0; i < n-1; ++i){ int tempDif = abs(a[i+1]-a[i]); if (tempDif < minDif){ minDif = tempDif; } } cout << minDif; return 0; }