Minimum Absolute Difference in an Array

  • + 0 comments

    Here is my solution for this (C++)

    include

    define ll long long

    define minimize(a,b) a=min(a,b)

    const ll MOD = (ll) 1e18+3; using namespace std; ll n,a[100001],ans=1e9+1; void fastip(){ ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0); }

    int main(){ fastip(); cin>> n; for (int i=0;i>a[i]; } sort(a,a+n); for (int i=1;i