Sets-STL

  • + 0 comments
    int q;
    cin>>q;``
    while(q>0)
    {
        int y, x;
        cin>>y>>x;
        if(y==1){qX.insert(x);}
        if(y==2){qX.erase(x);}
        if(y==3){
            auto it = qX.find(x);
            if(it != qX.end()){cout<<"Yes\n";}
            else{cout<<"No\n";}
        }
        q--;}