Cod sursa(job #2173515)
Utilizator | Data | 15 martie 2018 22:34:45 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.42 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream F("hashuri.in");
ofstream G("hashuri.out");
int n, q, x, ok;
unordered_map<int, int>m;
int main()
{
F >> n;
while(n--){
F >> q >> x;
if(q==1){
m[x]=1;
}
else{
if(q==2){
if(m[x]) m[x]=0;
}
else G<<m[x]<<'\n';
}
}
return 0;
}