# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154130 | Linca_Robert | Baloni (COCI15_baloni) | C++14 | 596 ms | 7360 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |