# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
827402 | AlphaMale06 | Baloni (COCI15_baloni) | C++14 | 128 ms | 424 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 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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |