Pagini recente » Cod sursa (job #439953) | Cod sursa (job #1343774) | Istoria paginii runda/road_to_ioi_7/clasament | Cod sursa (job #823868) | Cod sursa (job #2549529)
#include <fstream>
#include <map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int main()
{
map<unsigned int, bool> elem;
unsigned int n, x;
char op;
fin >> n;
while(n){
fin >> op >> x;
switch(op){
case '1':
elem[x] = true;
break;
case '2':
elem[x] = false;
break;
case '3':
fout << (elem.find(x) != elem.end() && elem[x]) << '\n';
break;
}
n--;
}
return 0;
}