```
inline void add(int x,int f)
{
if(x>n+1) return;
if(f==1)//into
{
cnt[x]++;
if(ans==x)
for(int i=x;i<=n+1;i++)
if(cnt[i]==0)
{
ans=i;
return;
}
}
else//out
{
cnt[x]--;
if(cnt[x]<0) cout<<"OPPPS";
if(cnt[x]==0)
ans=min(ans,x);
}
}
```
然后它输出了OPPPPS
by feng_chengjie @ 2018-03-01 21:12:21
已解决~
by feng_chengjie @ 2018-03-01 23:26:45