답안 #475131

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
475131 2021-09-21T09:01:45 Z Mr_OK_Man Po (COCI21_po) C++17
0 / 70
74 ms 7236 KB
#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;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Incorrect 0 ms 204 KB Output isn't correct
3 Incorrect 1 ms 204 KB Output isn't correct
4 Incorrect 11 ms 676 KB Output isn't correct
5 Incorrect 17 ms 872 KB Output isn't correct
6 Incorrect 58 ms 4180 KB Output isn't correct
7 Incorrect 74 ms 7236 KB Output isn't correct