# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1112 |
2013-06-25T12:16:08 Z |
comicos |
줄 세우기 (KOI13_jul) |
C++ |
|
180 ms |
8776 KB |
#include <stdio.h>
#define M 1010000
int a [M],d [M];
int main (void)
{
// freopen ("input29.txt","r",stdin);
// freopen ("output.txt","w",stdout);
int i,n,cnt = 1,max = 0;
scanf ("%d",&n);
for (i = 1; i <= n; i++)
{
scanf ("%d",&a[i]);
d [a[i]] = i;
}
for (i = 1; i <= n; i++)
{
if (d [i] < d[i + 1])
cnt++;
else
cnt = 1;
if (cnt > max)
max = cnt;
}
printf ("%d",n - max);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
8776 KB |
Output is correct |
2 |
Correct |
0 ms |
8776 KB |
Output is correct |
3 |
Correct |
0 ms |
8776 KB |
Output is correct |
4 |
Correct |
0 ms |
8776 KB |
Output is correct |
5 |
Correct |
0 ms |
8776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
8776 KB |
Output is correct |
2 |
Correct |
0 ms |
8776 KB |
Output is correct |
3 |
Correct |
0 ms |
8776 KB |
Output is correct |
4 |
Correct |
0 ms |
8776 KB |
Output is correct |
5 |
Correct |
0 ms |
8776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
8776 KB |
Output is correct |
2 |
Correct |
0 ms |
8776 KB |
Output is correct |
3 |
Correct |
2 ms |
8776 KB |
Output is correct |
4 |
Correct |
2 ms |
8776 KB |
Output is correct |
5 |
Correct |
1 ms |
8776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
8776 KB |
Output is correct |
2 |
Correct |
6 ms |
8776 KB |
Output is correct |
3 |
Correct |
13 ms |
8776 KB |
Output is correct |
4 |
Correct |
26 ms |
8776 KB |
Output is correct |
5 |
Correct |
54 ms |
8776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
82 ms |
8776 KB |
Output is correct |
2 |
Correct |
123 ms |
8776 KB |
Output is correct |
3 |
Correct |
144 ms |
8776 KB |
Output is correct |
4 |
Correct |
180 ms |
8776 KB |
Output is correct |
5 |
Correct |
173 ms |
8776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
179 ms |
8776 KB |
Output is correct |
2 |
Correct |
176 ms |
8776 KB |
Output is correct |
3 |
Correct |
178 ms |
8776 KB |
Output is correct |
4 |
Correct |
177 ms |
8776 KB |
Output is correct |
5 |
Correct |
169 ms |
8776 KB |
Output is correct |