Mex
int t[1005];
bitset<200005>st;
void init_st(){
st.set();
}
void add(int x){
t[x]++;
if(t[x]==1)
st[x]=0;
}
void del(int x){
t[x]--;
if(t[x]==0)
st[x]=1;
}
int mex(){
return st._Find_first();
}剪贴板
int t[1005];
bitset<200005>st;
void init_st(){
st.set();
}
void add(int x){
t[x]++;
if(t[x]==1)
st[x]=0;
}
void del(int x){
t[x]--;
if(t[x]==0)
st[x]=1;
}
int mex(){
return st._Find_first();
}