# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
151008 | joylintp | List of Unique Integers (FXCUP4_unique) | C++17 | 2 ms | 504 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>
#include "unique.h"
using namespace std;
vector<int> PickUnique(int N)
{
int last = 1, t;
vector<int> ret(N, 1);
for (int i = 1; i < N; i++)
{
t = UniqueCount(0, i);
if (t <= last)
ret[i] = 0;
last = t;
}
last = 1;
for (int i = N - 2; i >= 0; i--)
{
t = UniqueCount(i, N - 1);
if (t <= last)
ret[i] = 0;
last = t;
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |