80702024-01-12 11:57:48ChickenHús sütés (75 pont)cpp17Wrong answer 19/7550ms4468 KiB
#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main() {
    int ossz=0;
    int n;
    cin>>n;
    int a[n];
    for(int i=0; i<n; i++) {
        cin>>a[i];
    }
    sort(a, a + n);
    int k=0;
    while(k<n-1) {
        if (a[k]==a[k+1]) {
            ossz++;
        }
        k++;
    }
    cout<<a[n-1]+ossz;
return 0; }
SubtaskSumTestVerdictTimeMemory
base19/75
1Accepted0/03ms2020 KiB
2Accepted0/03ms2316 KiB
3Wrong answer0/026ms2856 KiB
4Accepted3/33ms2604 KiB
5Accepted3/33ms2844 KiB
6Accepted3/33ms2924 KiB
7Wrong answer0/33ms2944 KiB
8Wrong answer0/43ms2944 KiB
9Wrong answer0/43ms3076 KiB
10Wrong answer0/43ms3100 KiB
11Wrong answer0/43ms3180 KiB
12Wrong answer0/43ms3412 KiB
13Wrong answer0/448ms4268 KiB
14Wrong answer0/450ms4272 KiB
15Wrong answer0/548ms4264 KiB
16Wrong answer0/548ms4284 KiB
17Wrong answer0/550ms4328 KiB
18Wrong answer0/450ms4232 KiB
19Wrong answer0/448ms4360 KiB
20Accepted4/445ms4440 KiB
21Accepted4/435ms4444 KiB
22Wrong answer0/245ms4468 KiB
23Accepted2/221ms4444 KiB