# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
5068 |
2014-01-31T06:07:14 Z |
Namnamseo |
줄 세우기 (KOI13_jul) |
C++ |
|
176 ms |
8900 KB |
#import<cstdio>
int n,r[1000001],m[1000001],b,x,i;
main(){
scanf("%d",&n);
for(i=0;i<n;) scanf("%d",&b),r[b]=i++;
for(i=1;i<=n;i++)m[i]=(r[i]>r[i-1])?m[i-1]+1:1,(x<m[i])?x=m[i]:0;
printf("%d",n-x);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
8900 KB |
Output is correct |
2 |
Correct |
0 ms |
8900 KB |
Output is correct |
3 |
Correct |
0 ms |
8900 KB |
Output is correct |
4 |
Correct |
0 ms |
8900 KB |
Output is correct |
5 |
Correct |
0 ms |
8900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
8900 KB |
Output is correct |
2 |
Correct |
0 ms |
8900 KB |
Output is correct |
3 |
Correct |
0 ms |
8900 KB |
Output is correct |
4 |
Correct |
0 ms |
8900 KB |
Output is correct |
5 |
Correct |
0 ms |
8900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
8900 KB |
Output is correct |
2 |
Correct |
0 ms |
8900 KB |
Output is correct |
3 |
Correct |
0 ms |
8900 KB |
Output is correct |
4 |
Correct |
0 ms |
8900 KB |
Output is correct |
5 |
Correct |
0 ms |
8900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
8900 KB |
Output is correct |
2 |
Correct |
4 ms |
8900 KB |
Output is correct |
3 |
Correct |
8 ms |
8900 KB |
Output is correct |
4 |
Correct |
28 ms |
8900 KB |
Output is correct |
5 |
Correct |
44 ms |
8900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
80 ms |
8900 KB |
Output is correct |
2 |
Correct |
108 ms |
8900 KB |
Output is correct |
3 |
Correct |
140 ms |
8900 KB |
Output is correct |
4 |
Correct |
168 ms |
8900 KB |
Output is correct |
5 |
Correct |
164 ms |
8900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
148 ms |
8900 KB |
Output is correct |
2 |
Correct |
172 ms |
8900 KB |
Output is correct |
3 |
Correct |
176 ms |
8900 KB |
Output is correct |
4 |
Correct |
176 ms |
8900 KB |
Output is correct |
5 |
Correct |
164 ms |
8900 KB |
Output is correct |