# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148419 | rkm0959 (#200) | List of Unique Integers (FXCUP4_unique) | C++17 | 0 ms | 0 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>
#define L long long
using namespace std;
int UniqueCount(int L,int R);
int n;
vector<int> PickUnique(int N){
vector<int>ret(N,1);
n=N;
int i;
int now=1;
for(i=1;i<N;i++)
{
int temp=UniqueCount(0,i);
if(temp==now) ret[i]=0;
now=temp;
}
now=1;
for(i=N-1;i>0;i--)
{
int temp=UniqueCount(0,i);
if(temp==now) ret[i]=0;
now=temp;
}
return ret;
}