Submission #154273

# Submission time Handle Problem Language Result Execution time Memory
154273 2019-09-19T22:33:16 Z mihaican Baloni (COCI15_baloni) C++14
0 / 100
343 ms 6756 KB
#include <iostream>
#include <algorithm>
using namespace std;
int n,v[1000010],f[1000010],sum,of;
int main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>v[i];
    }
    for(int i=1;i<=n;i++){
        if(f[v[i]]>=0)
            of++;
        else
            f[v[i]]--;
        f[v[i]-1]++;

    }

    cout<<of;

}
# 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 3 ms 376 KB Output isn't correct
4 Incorrect 13 ms 376 KB Output isn't correct
5 Incorrect 337 ms 6416 KB Output isn't correct
6 Incorrect 343 ms 6756 KB Output isn't correct
7 Incorrect 273 ms 5420 KB Output isn't correct
8 Incorrect 274 ms 5308 KB Output isn't correct
9 Incorrect 308 ms 5892 KB Output isn't correct
10 Incorrect 306 ms 5888 KB Output isn't correct