Pagini recente » Diferente pentru problema/2sat intre reviziile 27 si 26 | Cod sursa (job #3150027) | Cod sursa (job #1848106) | Cod sursa (job #1798132) | Cod sursa (job #1819194)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
map <int,bool> h;
int n;
int main()
{
int op,x;
fin>>n;
while(n--)
{
fin>>op>>x;
if (op==1) h[x]=true;
else if (op==2) h[x]=false;
else
{
if (h[x]==true) fout<<"1\n";
else fout<<"0\n";
}
}
fin.close();
fout.close();
return 0;
}