# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
998560 | 12345678 | List of Unique Integers (FXCUP4_unique) | C++17 | 1 ms | 856 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) {
int p=0;
vector<int> cnt(N), res(N);
for (int i=0; i<N; i++)
{
int c=UniqueCount(0, i);
if (c>p) cnt[i]++;
p=c;
}
p=0;
for (int i=N-1; i>=0; i--)
{
int c=UniqueCount(i, N-1);
if (c>p) cnt[i]++;
p=c;
}
for (int i=0; i<N; i++) res[i]=cnt[i]==2;
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |