# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148959 | etyu (#200) | List of Unique Integers (FXCUP4_unique) | C++17 | 7 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"
int l[209], r[209];
std::vector<int> PickUnique(int N) {
for (int i = 0; i < N; i++) {
l[i] = UniqueCount(0, i);
r[i] = UniqueCount(i, N - 1);
}
std::vector<int> a;
for (int i = 0; i < N; i++) {
if ((i == 0 || l[i] - l[i - 1] == 1) && (i == N - 1 || r[i] - r[i + 1] == 1)) a.push_back(1);
else a.push_back(0);
}
return a;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |