# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1132634 | Pwo | List of Unique Integers (FXCUP4_unique) | C++20 | 0 ms | 584 KiB |
#include "unique.h"
using namespace std;
vector<int> PickUnique(int n) {
vector<int> ans(n, 1);
int prev = 0;
for (int i = 0; i < n; i++) {
int res = UniqueCount(0, i);
if (res <= prev) ans[i] = 0;
prev = res;
}
prev = 0;
for (int i = n - 1; i >= 0; i--) {
int res = UniqueCount(i, n - 1);
if (res <= prev) ans[i] = 0;
prev = res;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |