Submission #3006

# Submission time Handle Problem Language Result Execution time Memory
3006 2013-08-22T10:29:52 Z imsifile 줄 세우기 (KOI13_jul) C++
22 / 22
172 ms 5384 KB
#include<stdio.h>
int n,c[1100000],i,a,m;
int main(){
  for(scanf("%d",&n);i<n;i++)scanf("%d",&a),c[a]=i+1;
  for(i=2,a=0;i<=n;i++){
    c[i]>c[i-1]?a++:a=0;m=a>m?a:m;
  }
  printf("%d",n-m-1);
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 5384 KB Output is correct
2 Correct 0 ms 5384 KB Output is correct
3 Correct 0 ms 5384 KB Output is correct
4 Correct 0 ms 5384 KB Output is correct
5 Correct 0 ms 5384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 5384 KB Output is correct
2 Correct 0 ms 5384 KB Output is correct
3 Correct 0 ms 5384 KB Output is correct
4 Correct 0 ms 5384 KB Output is correct
5 Correct 0 ms 5384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 5384 KB Output is correct
2 Correct 0 ms 5384 KB Output is correct
3 Correct 0 ms 5384 KB Output is correct
4 Correct 0 ms 5384 KB Output is correct
5 Correct 0 ms 5384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 5384 KB Output is correct
2 Correct 4 ms 5384 KB Output is correct
3 Correct 12 ms 5384 KB Output is correct
4 Correct 20 ms 5384 KB Output is correct
5 Correct 44 ms 5384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 76 ms 5384 KB Output is correct
2 Correct 112 ms 5384 KB Output is correct
3 Correct 116 ms 5384 KB Output is correct
4 Correct 148 ms 5384 KB Output is correct
5 Correct 172 ms 5384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 148 ms 5384 KB Output is correct
2 Correct 164 ms 5384 KB Output is correct
3 Correct 156 ms 5384 KB Output is correct
4 Correct 152 ms 5384 KB Output is correct
5 Correct 168 ms 5384 KB Output is correct