# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
16224 |
2015-08-18T10:18:06 Z |
eaststar |
줄 세우기 (KOI13_jul) |
C++14 |
|
178 ms |
12800 KB |
#include <stdio.h>
int a[1000010],chk[1000010],s[1000010],mx;
int main(){
int i,n;
scanf("%d",&n);
for(i=1;i<=n;++i){
scanf("%d",&a[i]);
chk[a[i]]=1;
if(chk[a[i]-1])s[a[i]]=s[a[i]-1]+1;
if(mx<s[a[i]])mx=s[a[i]];
}
printf("%d",n-mx-1);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
12800 KB |
Output is correct |
2 |
Correct |
0 ms |
12800 KB |
Output is correct |
3 |
Correct |
0 ms |
12800 KB |
Output is correct |
4 |
Correct |
0 ms |
12800 KB |
Output is correct |
5 |
Correct |
0 ms |
12800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
12800 KB |
Output is correct |
2 |
Correct |
0 ms |
12800 KB |
Output is correct |
3 |
Correct |
0 ms |
12800 KB |
Output is correct |
4 |
Correct |
0 ms |
12800 KB |
Output is correct |
5 |
Correct |
0 ms |
12800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
12800 KB |
Output is correct |
2 |
Correct |
0 ms |
12800 KB |
Output is correct |
3 |
Correct |
4 ms |
12800 KB |
Output is correct |
4 |
Correct |
2 ms |
12800 KB |
Output is correct |
5 |
Correct |
0 ms |
12800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
12800 KB |
Output is correct |
2 |
Correct |
7 ms |
12800 KB |
Output is correct |
3 |
Correct |
12 ms |
12800 KB |
Output is correct |
4 |
Correct |
26 ms |
12800 KB |
Output is correct |
5 |
Correct |
66 ms |
12800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
86 ms |
12800 KB |
Output is correct |
2 |
Correct |
117 ms |
12800 KB |
Output is correct |
3 |
Correct |
159 ms |
12800 KB |
Output is correct |
4 |
Correct |
167 ms |
12800 KB |
Output is correct |
5 |
Correct |
178 ms |
12800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
175 ms |
12800 KB |
Output is correct |
2 |
Correct |
165 ms |
12800 KB |
Output is correct |
3 |
Correct |
161 ms |
12800 KB |
Output is correct |
4 |
Correct |
129 ms |
12800 KB |
Output is correct |
5 |
Correct |
0 ms |
12800 KB |
Output is correct |