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>
#include<stdlib.h>
int arr[10000];
int i,j;
int N;
int MAX=-1;
int main()
{
scanf("%d",&N);
for(i=0;i<N;i++)
{
scanf("%d",&j);
arr[j]=arr[j-1]+1;
if(MAX<arr[j])
MAX=arr[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... |