# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
247087 | dantoh000 | List of Unique Integers (FXCUP4_unique) | C++17 | 5 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 <bits/stdc++.h>
#include "unique.h"
using namespace std;
vector<int> PickUnique(int N){
vector<int> U(N);
int Ql[N], Qr[N];
for (int i = 0; i < N; i++){
Ql[i] = UniqueCount(0,i);
Qr[i] = UniqueCount(i,N-1);
}
for (int i = 0; i < N; i++){
if ((i == 0 || Ql[i] == Ql[i-1]+1) && (i == N-1 || Qr[i] == Qr[i+1]+1)){
U[i] = 1;
}
else U[i] = 0;
}
return U;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |