Submission #5249

# Submission time Handle Problem Language Result Execution time Memory
5249 2014-02-22T05:10:01 Z jspark19990205 줄 세우기 (KOI13_jul) C++
5.5 / 22
0 ms 1124 KB
#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
1 Correct 0 ms 1124 KB Output is correct
2 Correct 0 ms 1124 KB Output is correct
3 Correct 0 ms 1124 KB Output is correct
4 Correct 0 ms 1124 KB Output is correct
5 Correct 0 ms 1124 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1124 KB Output is correct
2 Correct 0 ms 1124 KB Output is correct
3 Correct 0 ms 1124 KB Output is correct
4 Correct 0 ms 1124 KB Output is correct
5 Correct 0 ms 1124 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1124 KB Output is correct
2 Correct 0 ms 1124 KB Output is correct
3 Runtime error 0 ms 1120 KB SIGSEGV Segmentation fault
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 1120 KB SIGSEGV Segmentation fault
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 1120 KB SIGSEGV Segmentation fault
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 1120 KB SIGSEGV Segmentation fault
2 Halted 0 ms 0 KB -