# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159708 | geon040702 | 줄 세우기 (KOI13_jul) | C++14 | 170 ms | 14856 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |