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