# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148459 | 1 WA = 5 Push Up (#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>
std::vector<int> PickUnique(int N) {
std::vector<int> ret(N,1);
int sav1[201], sav2[201];
for(int i = 0; i < N; i++){
sav1[i] = UniqueCount(0,i);
sav2[i] = UniqueCount(i,N-1);
}
for(int i = 0; i < N; i++){
if(i != 0){
int v1 = sav1[i];
int v2 = sav1[i-1];
if(v1 != v2+1) ret[i] = 0;
}
if(i != N-1){
int v1 = sav2[i];
int v2 = sav2[i+1];
if(v1 != v2+1) ret[i] = 0;
}
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |