Submission #3149

#TimeUsernameProblemLanguageResultExecution timeMemory
3149movie_jo줄 세우기 (KOI13_jul)C11
22 / 22
180 ms4992 KiB
#include<stdio.h> int N,x,y[1000001],i,S=1,M; int main(void) { scanf("%d",&N); for(i=1;i<=N;i++) { scanf("%d",&x); y[x]=i; } for(i=1;i<N;i++) { if(y[i]>y[i+1]) S=1; else { S++; if(S>M) M=S; } } printf("%d",N-M); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...