#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 |
1 |
Incorrect |
1 ms |
340 KB |
Wrong |
2 |
Halted |
0 ms |
0 KB |
- |