33182023-02-25 09:36:27BttrngHús sütés (75 pont)cpp11Wrong answer 19/7579ms12584 KiB
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin>>n;
    map<int, int>cucc;
    int ln=0;
    for(int i=1; i<=n; i++){
        int x;
        cin>>x;
        cucc[x]++;
        ln=max(ln, x);
    }
    for(auto i=cucc.begin(); i!=cucc.end(); i++){
        int k=i->second;
        ln+=k-1;
    }
    cout<<ln;



}
SubtaskSumTestVerdictTimeMemory
base19/75
1Accepted0/03ms1936 KiB
2Accepted0/03ms2016 KiB
3Wrong answer0/039ms6820 KiB
4Accepted3/33ms2480 KiB
5Accepted3/33ms2520 KiB
6Accepted3/33ms2652 KiB
7Wrong answer0/33ms2764 KiB
8Wrong answer0/43ms2828 KiB
9Wrong answer0/43ms2904 KiB
10Wrong answer0/43ms3048 KiB
11Wrong answer0/43ms3152 KiB
12Wrong answer0/43ms3268 KiB
13Wrong answer0/479ms12156 KiB
14Wrong answer0/470ms8820 KiB
15Wrong answer0/552ms4644 KiB
16Wrong answer0/575ms10512 KiB
17Wrong answer0/561ms6756 KiB
18Wrong answer0/479ms12584 KiB
19Wrong answer0/479ms12580 KiB
20Accepted4/439ms3888 KiB
21Accepted4/432ms4056 KiB
22Wrong answer0/248ms4860 KiB
23Accepted2/218ms4256 KiB