Submission #827402

#TimeUsernameProblemLanguageResultExecution timeMemory
827402AlphaMale06Baloni (COCI15_baloni)C++14
100 / 100
128 ms424 KiB
#include <bits/stdc++.h> using namespace std; int cnt[1000003]; int main() { int n; cin >> n; int ans=n; for(int i=0; i< n; ++i){ int a; cin >> a; if(cnt[a+1]){ cnt[a+1]--; ans--; } cnt[a]++; } cout << ans << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...