70592023-12-29 08:43:13MagyarKendeSZLGHús sütés (75 pont)cpp17Wrong answer 19/7550ms12676 KiB
#include <bits/stdc++.h>

#define speed cin.tie(0); ios::sync_with_stdio(0)
#define cinv(v) for (auto& e : v) cin >> e;
#define all(v) v.begin(), v.end()
#define has(s, e) s.count(e)

using namespace std;
using ll = long long;
using point = array<int, 2>;

int main() {
    speed;

    int N;
    cin >> N;
    set<int> meatS;
    for (int i = 0, a; i < N; i++) {
        cin >> a;
        meatS.insert(a);
    }
    
    cout << *meatS.rbegin() + N - meatS.size();
}
SubtaskSumTestVerdictTimeMemory
base19/75
1Accepted0/03ms1824 KiB
2Accepted0/03ms2016 KiB
3Wrong answer0/024ms6696 KiB
4Accepted3/33ms2508 KiB
5Accepted3/33ms2336 KiB
6Accepted3/33ms2460 KiB
7Wrong answer0/33ms2676 KiB
8Wrong answer0/43ms2692 KiB
9Wrong answer0/43ms2852 KiB
10Wrong answer0/43ms2952 KiB
11Wrong answer0/43ms3284 KiB
12Wrong answer0/43ms3220 KiB
13Wrong answer0/448ms12224 KiB
14Wrong answer0/441ms9040 KiB
15Wrong answer0/528ms4556 KiB
16Wrong answer0/545ms10560 KiB
17Wrong answer0/535ms6832 KiB
18Wrong answer0/448ms12676 KiB
19Wrong answer0/450ms12672 KiB
20Accepted4/416ms3948 KiB
21Accepted4/418ms3852 KiB
22Wrong answer0/225ms4364 KiB
23Accepted2/29ms3800 KiB