Cod sursa(job #3124442)
Utilizator | Data | 28 aprilie 2023 18:34:19 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.45 kb |
#include <fstream>
#include <vector>
#include <map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
int n;
map<int, int> f;
int main()
{
cin >> n;
for(int i = 1; i <= n; i++)
{
int tip, x;
cin >> tip >> x;
if(tip == 1)
f[x] = 1;
else if(tip == 2)
f[x] = 0;
else
cout << f[x] << '\n';
}
return 0;
}