# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
762364 | goodbyehanbyeol | List of Unique Integers (FXCUP4_unique) | C++17 | 1 ms | 468 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;
typedef long long ll;
vector<int> PickUnique(int n){
vector<int> ret(n, 1);
vector<int> a(n), b(n);
for(int i=0; i<n; i++){
a[i] = UniqueCount(0, i);
if(i && a[i] != a[i-1] + 1) ret[i] = 0;
}
for(int i=n-1; i>=0; i--){
b[i] = UniqueCount(i, n-1);
if(i<n-1 && b[i] != b[i+1] + 1) ret[i] = 0;
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |