Cod sursa(job #1882524)
Utilizator | Data | 17 februarie 2017 11:57:30 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
map<int,bool> M;
int n,p,x;
int main()
{
f >> n;
for(int i = 1; i <= n; ++i){
f >> p >> x;
if(p == 1)
M[x] = 1;
if(p == 2)
M[x] = 0;
if(p == 3)
g << (M[x] == 1) << '\n';
}
return 0;
}