Pagini recente » Cod sursa (job #1019129) | Cod sursa (job #1112216) | Cod sursa (job #548596) | Cod sursa (job #2329949) | Cod sursa (job #2681397)
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <cstring>
#include <fstream>
#include <algorithm>
#include <set>
#include <bitset>
#include <cmath>
#include <map>
#include <vector>
#include <queue>
#include <stack>
#define INF 1e9
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int main()
{
map<int,int> mapa;
int n;
f>>n;
while(n--)
{
int op , x;
f>>op>>x;
if(op == 1)
{
mapa[x] = 1;
}
else if(op == 2)
{
mapa[x] =0 ;
}
else if(op == 3)
{
g<<(mapa[x] == 1 ? 1 : 0);g<<'\n';
}
}
return 0;
}