# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
469496 | Karabasan | Baloni (COCI15_baloni) | C++17 | 90 ms | 6040 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 dizi[1000005];
int ind[1000005];
int n;
int main()
{
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%d",&dizi[i]);
int cevap=n;
for(int i=0;i<n;i++)
{
if(ind[dizi[i]+1]>0)
{
cevap--;
ind[dizi[i]+1]--;
}
ind[dizi[i]]++;
}
printf("%d",cevap);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |