Pagini recente » Cod sursa (job #2709523) | Cod sursa (job #1358611) | Cod sursa (job #2061034) | Diferente pentru problema/inversmodular intre reviziile 105 si 117 | Cod sursa (job #1688100)
#include <fstream>
#include <map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int t, nr, cer, x;
map <int, int> a;
int main()
{
for (f >> t; t; t--)
{
f >> cer >> x;
if (cer == 1 && a.find(x) == a.end())
a[x] = 1;
else if (cer == 2)
a.erase(x);
else if (cer == 3)
g << (a.find(x) != a.end()) << '\n';
}
return 0;
}