This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#import<cstdio>
int n,a,v[1000005],mx;
int main()
{
int i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a);
v[a]=v[a-1]+1;
if(v[a]>mx)mx=v[a];
}
printf("%d",n-mx);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |