# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
8448 |
2014-09-14T12:15:30 Z |
adream |
줄 세우기 (KOI13_jul) |
C++14 |
|
12 ms |
1676 KB |
#include <iostream>
#include <cstring>
using namespace std;
int n;
int a[201], cache[201];
int lis(int b){
int&ret=cache[b];
if(ret!=-1) return ret;
ret=1;
for(int i=b+1; i<n; ++i){
if(a[b]<a[i])
ret=max(ret, lis(i)+1);
}
return ret;
}
int main(){
scanf("%d", &n);
memset(cache, -1, sizeof(cache));
for(int i=0; i<n; ++i)
scanf("%d",&a[i]);
int ans=-1;
for(int i=0; i<n; ++i)
ans=max(ans,lis(i));
printf("%d\n", n-ans);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1676 KB |
Output is correct |
2 |
Incorrect |
0 ms |
1676 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1676 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1676 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
12 ms |
1676 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
1672 KB |
futex (syscall #202) was called by the program (disallowed syscall) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1672 KB |
futex (syscall #202) was called by the program (disallowed syscall) |
2 |
Halted |
0 ms |
0 KB |
- |