Cod sursa(job #2019946)
| Utilizator | Data | 8 septembrie 2017 22:11:52 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.36 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream F("hashuri.in");
ofstream G("hashuri.out");
int n, q, x;
unordered_map<int,bool> m;
int main()
{
F >> n;
m.reserve(n);
while(n--)
{
F >> q >> x;
if(q == 1) m[x] = 1;
else if(q == 2) m[x] = 0;
else G << m[x] << '\n';
}
return 0;
}
