| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1331608 | kenkunkin | List of Unique Integers (FXCUP4_unique) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h?
#include "unique.h"
using namespace std;
vector <int> PickUnique(int n)
{
vector <int> a(n);
for (int i=0;i<n;i++) a[i]=1;
int u=1;
for (int i=1;i<n;i++)
{
int hi=UniqueCount(0,i);
if (hi<=u)
a[i]=0;
u=hi;
}
u=1;
for (int i=n-1;i>=0;i--)
{
int hi=UniqueCount(i,n-1);
if (hi<=u)
a[i]=0;
u=hi;
}
return a;
}
