# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1101725 | rayan_bd | List of Unique Integers (FXCUP4_unique) | C++17 | 1 ms | 336 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>
#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... |