Submission #154025

# Submission time Handle Problem Language Result Execution time Memory
154025 2019-09-17T18:07:58 Z AlexPascu007 Baloni (COCI15_baloni) C++
0 / 100
367 ms 3796 KB
#include <iostream>
using namespace std;
int n,i,sol,v[1000010],f[1000010];
int main() {
    cin>>n;
    for (i=1;i<=n;i++)
        cin>>v[i];
    for (i=1;i<=n;i++) {
        if (f[v[i]]==0) {
            sol++;
            f[v[i]-1]=1;
        }
        else
            f[v[i]-1]=1;
    }
    cout<<sol;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 376 KB Output isn't correct
2 Incorrect 3 ms 376 KB Output isn't correct
3 Incorrect 4 ms 376 KB Output isn't correct
4 Incorrect 4 ms 376 KB Output isn't correct
5 Incorrect 338 ms 3452 KB Output isn't correct
6 Incorrect 367 ms 3796 KB Output isn't correct
7 Incorrect 320 ms 3144 KB Output isn't correct
8 Incorrect 269 ms 3296 KB Output isn't correct
9 Incorrect 321 ms 3256 KB Output isn't correct
10 Incorrect 302 ms 3448 KB Output isn't correct