# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
151241 | dongwon0427 | 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 "unique.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> PickUnique(int n) {
vector<int> ret(n);
int t = 1;
for(int i=1;i<n;i++) {
int nxt = UniqueCount(0,i);
if(t >= nxt) {
ret[i] = 1;
}
t = nxt;
}
t = 1;
for(int i=n-2;i>=0;i--) {
int nxt = UniqueCount(i,n-1);
if(t >= nxt) {
ret[i] = 1;
}
t = nxt;
}
for(int i=0;i<n;i++) ret[i] = 1-ret[i];
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |