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<stdio.h>
int a[9999];
int N;
int i,j;
int MAX=-1;
int main()
{
scanf("%d",&N);
for(i=1;i<=N;i++)
{
scanf("%d",&j);
a[j]=a[j-1]+1;
if(MAX<a[j])
MAX = a[j];
}
printf("%d\n",N-MAX);
return 0;
}
# | 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... |