Submission #154130

#TimeUsernameProblemLanguageResultExecution timeMemory
154130Linca_RobertBaloni (COCI15_baloni)C++14
0 / 100
596 ms7360 KiB
#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 timeMemoryGrader output
Fetching results...