# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1101723 | rayan_bd | List of Unique Integers (FXCUP4_unique) | C++17 | 1 ms | 340 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> vec={1,1,2,2,3,3};
/*int UniqueCount(int L,int R){
set<int> st;
for(int i=L;i<=R;++i){
st.insert(vec[i]);
}
return st.size();
}*/
vector<int> PickUnique(int N){
vector<int> ans(N,1);
int prev=0,curr=0;
for(int i=0;i<N;++i){
curr=UniqueCount(0,i);
if(curr==prev){
ans[i]=0;
}
prev=curr;
}
return ans;
}
/*int main(){
vector<int> ans=PickUnique((int)vec.size());
for(auto it:ans) cout<<it<<" ";
return 0;
}*/
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |