제출 #475130

#제출 시각아이디문제언어결과실행 시간메모리
475130Mr_OK_ManPo (COCI21_po)C++17
0 / 70
68 ms7220 KiB
#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) { c++; continue; } else { c+=i.first-m; } } cout<<c<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...