# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
247092 | tqbfjotld | 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 "unique.h"
#include <bits/stdc++.h>
using namespace std;
int arr1[205];
int arr2[205];
std::vector<int> PickUnique(int N) {
arr1[0] = 1;
arr2[N-1] = 1;
for (int x = 1; x<N; x++){
arr1[x] = UniqueCount(0,x);
}
for (int x = 0; x<N-1; x++){
arr2[x] = UniqueCount(x,N-1);
}
vector<int> ans;
if (arr2[0]>arr2[1]){
ans.push_back(1);
}
else{
ans.push_back(0);
}
for (int x = 1; x<N-1; x++){
if (arr2[x]>arr2[x+1] && arr1[x]>arr1[x-1]){
ans.push_back(1);
}
else{
ans.push_back(0);
}
}
if (arr1[N-1]>arr1[N-2]){
ans.push_back(1);
}
else{
ans.push_back(0);
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |