# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
475131 | Mr_OK_Man | Po (COCI21_po) | C++17 | 74 ms | 7236 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main()
{
// cout << "Hello world!" << endl;
long long n,c=0;
cin>>n;
long long a[n];
map<long long,long long>mp;
long long m=1e9+1;
for(int i=0;i<n;i++)
{
cin>>a[i];
mp[a[i]]++;
m=min(a[i],m);
}
for(auto i:mp)
{
if(i.first==m&&m!=0)
{
c++;
continue;
}
else
{
c+=i.first-m;
}
}
cout<<c<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |