Submission #4989

#TimeUsernameProblemLanguageResultExecution timeMemory
4989tkxkd7223줄 세우기 (KOI13_jul)C++98
22 / 22
152 ms8900 KiB
#include <stdio.h> int a[1000010]; int b[1000010]; int main() { int i, n, ma; scanf("%d", &n); for(i=1 ; i<=n ; i++){ scanf("%d", &a[i]); } ma=0; for(i=1 ; i <=n ; i++){ b[a[i]]=b[a[i]-1]+1; if(b[a[i]]>=ma)ma=b[a[i]]; } printf("%d", n-ma); return 0; }
#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...