Cod sursa(job #2375355)
Utilizator | Data | 8 martie 2019 08:14:06 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.35 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
map <int, int> n;
int q, x, op;
int main()
{
fin >> q;
while(q--)
{
fin >> op >> x;
if (op == 3) fout << n[x] << "\n";
else if (op == 2) n[x] = 0;
else n[x] = 1;
}
return 0;
}