# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148599 | 팀명못정해서15시간째고민중인팀 (#200) | List of Unique Integers (FXCUP4_unique) | C++17 | 6 ms | 512 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;
int A[100009], B[100009];
vector<int> PickUnique(int N) {
vector<int> ans(N, 0);
int p = 0;
for(int i=0; i<N; i++) {
int t = i+1 - UniqueCount(0, i);
if(t == p) A[i] = 1;
p = t;
}
p = 0;
for(int i=N-1; i>=0; i--) {
int t = (N-i) - UniqueCount(i, N-1);
if(t == p) B[i] = 1;
p = t;
}
for(int i=0; i<N; i++) {
if(A[i] && B[i]) ans[i] = 1;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |