# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2446 |
2013-07-22T00:14:06 Z |
tncks0121 |
줄 세우기 (KOI13_jul) |
C++ |
|
180 ms |
4792 KB |
#include <stdio.h>
int n, pos[1000005];
int main() {
scanf("%d", &n);
for(int i= 1; i <=n; i++) {
int j; scanf("%d", &j);
pos[j] = i;
}
int res = 0;
for(int i = 2; i <= n; i++) {
if(pos[i - 1] > pos[i]) ++res;
}
printf("%d", res);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
4792 KB |
Output is correct |
2 |
Incorrect |
0 ms |
4792 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
4792 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
4792 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
4792 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
107 ms |
4792 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
180 ms |
4792 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |