Submission #154130

# Submission time Handle Problem Language Result Execution time Memory
154130 2019-09-18T13:23:23 Z Linca_Robert Baloni (COCI15_baloni) C++14
0 / 100
596 ms 7360 KB
#include<bits/stdc++.h>
using namespace std;
int N, arr[1000005];
multiset<int> S;
int main(){
    cin >> N;
    for( int i = 1; i <= N; i++ )
        cin >> arr[i];
    for( int i = 1; i <= N; i++ ){
        if( S.find( arr[i] ) != S.end() ){
            S.erase( arr[i] );
        }
        S.insert( arr[i] - 1 );
    }
    cout << (int)(S.size()) << endl;
    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 5 ms 376 KB Output isn't correct
4 Incorrect 6 ms 380 KB Output isn't correct
5 Incorrect 568 ms 7240 KB Output isn't correct
6 Incorrect 588 ms 7360 KB Output isn't correct
7 Incorrect 477 ms 6096 KB Output isn't correct
8 Incorrect 493 ms 6112 KB Output isn't correct
9 Incorrect 596 ms 6584 KB Output isn't correct
10 Incorrect 536 ms 6676 KB Output isn't correct