# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1126168 | WH8 | List of Unique Integers (FXCUP4_unique) | C++20 | 1 ms | 588 KiB |
#include <bits/stdc++.h>
#include "unique.h"
using namespace std;
vector<int> PickUnique(int N) {
vector<int> v(N, 1);
int prv = 0;
for (int i = 0; i < N; i++){
int cur = UniqueCount(0, i);
if (cur <= prv){
v[i] = 0;
}
prv = cur;
}
prv = 0;
for (int i = N-1; i >=0; i--){
int cur = UniqueCount(i, N-1);
if (cur <= prv){
v[i] = 0;
}
prv = cur;
}
//for (auto it : v) cout << it << endl;
return v;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |