AcWing 1945. Cow Baseball – AcWing

author:

unoff

2022-01-19 19:08:41 , visible to all, read 11


#include
#include
using namespace std;

const int N=1e3+5;

int n,a[N];

int main()
{
    cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    sort(a+1,a+1+n);
    int ans=0;
    for(int i=1;i=a[j]-a[i]) ans+=r-l;
        }
    }
    cout<

Facebook
Pinterest
Twitter
LinkedIn
Email

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *