Submission #898486

# Submission time Handle Problem Language Result Execution time Memory
898486 2024-01-04T18:16:56 Z Blagoj Baloni (COCI15_baloni) C++17
0 / 100
42 ms 468 KB
#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define ll long long
#define all(x) (x).begin(), (x).end()

const int mxh = 1e6 + 10;
int cnt[mxh];

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    int ans = 0;
    for (int i = 0; i < n; i++) {
        int x;
        cin >> x;
        if (!cnt[x]) ans++;
        cnt[x - 1]++;
    }
    cout << ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Incorrect 1 ms 348 KB Output isn't correct
5 Incorrect 41 ms 348 KB Output isn't correct
6 Incorrect 42 ms 348 KB Output isn't correct
7 Incorrect 34 ms 464 KB Output isn't correct
8 Incorrect 34 ms 468 KB Output isn't correct
9 Incorrect 38 ms 348 KB Output isn't correct
10 Incorrect 37 ms 344 KB Output isn't correct