# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1101725 | rayan_bd | List of Unique Integers (FXCUP4_unique) | C++17 | 1 ms | 336 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "unique.h"
using namespace std;
vector<int> PickUnique(int N){
vector<int> ans(N,0);
for(int i=0;i<N;++i){
int lft=0,rgt=0,c_with_lft=0,c_with_rgt=0;
if(i>0) lft=UniqueCount(0,i-1);
if(i+1<N) rgt=UniqueCount(i+1,N);
c_with_lft=UniqueCount(0,i);
c_with_rgt=UniqueCount(i,N);
if(lft<c_with_lft&&rgt<c_with_rgt){
ans[i]=1;
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |