# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
151486 | leduykhongngu | 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 <vector>
std::vector<int> PickUnique(int N)
{
std::vector<int> res(N, 1);
int preask = 1;
for (int i = 1; i < N; ++i) {
int ask = UniqueCount(0, i);
if (ask <= preask) {
res[i] = 0;
}
preask = ask;
}
preask = 1;
for (int i = N - 2; i >= 0; --i) {
int ask = UniqueCount(i, N - 1);
if (ask <= preask) {
res[i] = 0;
}
preask = ask;
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |