# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1132568 | emptypringlescan | List of Unique Integers (FXCUP4_unique) | C++20 | 0 ms | 584 KiB |
#include <bits/stdc++.h>
#include "unique.h"
using namespace std;
vector<int> PickUnique(int n){
vector<int> can(n);
for(int i=0; i<n; i++) can[i]=1;
int prev=0;
for(int i=0; i<n; i++){
int x=UniqueCount(0,i);
if(x<=prev) can[i]=0;
prev=x;
}
prev=0;
for(int i=n-1; i>=0; i--){
int x=UniqueCount(i,n-1);
if(x<=prev) can[i]=0;
prev=x;
}
return can;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |