# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148719 | ----MIT합격선---- (#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 <stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
int L[222],R[222];
vector<int> ans;
std::vector<int> PickUnique(int N) {
ans.resize(N);
for(int i=0;i<N;i++) L[i]=UniqueCount(0,i);
for(int i=0;i<N;i++) R[i]=UniqueCount(i,N-1);
for(int i=0;i<N;i++) ans[i]=1;
if(!L[0]) ans[0]=0;
for(int i=1;i<N;i++){
if(L[i]-L[i-1]<=0) ans[i]=0;
}
if(!R[N-1]) ans[N-1]=0;
for(int i=0;i<N-1;i++){
if(R[i]-R[i+1]<=0) ans[i]=0;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |