# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159708 | 2019-10-24T04:13:29 Z | geon040702 | 줄 세우기 (KOI13_jul) | C++14 | 170 ms | 14856 KB |
#include <bits/stdc++.h> using namespace std; int number[1000010], memo[1000010]; int n, i, m, r; int main(void) { scanf("%d", &n); for(i=1;i<=n;i++) { scanf("%d", &number[i]); memo[number[i]] = memo[number[i]-1] + 1; if(memo[number[i]] > m) { m = memo[number[i]]; } } printf("%d\n", n-m); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 632 KB | Output is correct |
2 | Correct | 3 ms | 504 KB | Output is correct |
3 | Correct | 4 ms | 504 KB | Output is correct |
4 | Correct | 4 ms | 504 KB | Output is correct |
5 | Correct | 4 ms | 504 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 760 KB | Output is correct |
2 | Correct | 8 ms | 888 KB | Output is correct |
3 | Correct | 14 ms | 1400 KB | Output is correct |
4 | Correct | 28 ms | 2552 KB | Output is correct |
5 | Correct | 54 ms | 4984 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 84 ms | 7544 KB | Output is correct |
2 | Correct | 119 ms | 10468 KB | Output is correct |
3 | Correct | 145 ms | 12680 KB | Output is correct |
4 | Correct | 165 ms | 14840 KB | Output is correct |
5 | Correct | 168 ms | 14856 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 169 ms | 14820 KB | Output is correct |
2 | Correct | 170 ms | 14844 KB | Output is correct |
3 | Correct | 169 ms | 14840 KB | Output is correct |
4 | Correct | 168 ms | 14812 KB | Output is correct |
5 | Correct | 164 ms | 14840 KB | Output is correct |