# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148826 | 20190901 (#200) | List of Unique Integers (FXCUP4_unique) | C++17 | 8 ms | 512 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 "unique.h"
std::vector<int> PickUnique(int N) {
std::vector<int> res(N, 0);
int cnt = UniqueCount(0, N-1);
int real_count=0;
int count=cnt;
int l=0, r=cnt;
for (int i = 1; i < N; i++)
{
int new_l = UniqueCount(0, i-1);
int new_r = UniqueCount(i, N-1);
if(new_l > l && new_r<r)
{
res[i-1]=1;
real_count++;
count--;
}
l=new_l, r=new_r;
}
if(count) res[N-1]=1;
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |