Pagini recente » Cod sursa (job #2398378) | Cod sursa (job #2861406) | Istoria paginii runda/oni_11_12_11/clasament | Istoria paginii runda/oni_2012_11-12_ziua_1/clasament | Cod sursa (job #2722599)
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n;
unordered_map <int, bool> m;
int main()
{
f >> n;
int c, x;
for(int i = 1; i <= n; ++i) {
f >> c >> x;
if(c == 1)
m[x] = true;
else if(c == 2 && m[x])
m[x] = false;
else if(c == 3) g << (m[x] ? "1\n" : "0\n");
}
}