Submission #153884

# Submission time Handle Problem Language Result Execution time Memory
153884 2019-09-17T08:19:21 Z vladciuperceanu Baloni (COCI15_baloni) C++14
0 / 100
340 ms 376 KB
#include <iostream>

using namespace std;

int n,i,x,f[1000005];

int main()
{
    cin >> n; int sol = 0;
    for (i=1; i<=n; i++)
    {
        cin >> x;
        if (f[x+1] == 0)
            sol++;
        else
            if (f[x] > f[x+1])
                sol++;
        f[x] = i;
    }
    cout << sol;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 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 376 KB Output isn't correct
6 Incorrect 340 ms 368 KB Output isn't correct
7 Incorrect 301 ms 360 KB Output isn't correct
8 Incorrect 333 ms 376 KB Output isn't correct
9 Incorrect 300 ms 376 KB Output isn't correct
10 Incorrect 300 ms 376 KB Output isn't correct