Cod sursa(job #1957775)
Utilizator | Data | 7 aprilie 2017 19:18:51 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.33 kb |
#include<fstream>
#include<unordered_map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
unordered_map<int,bool> m;
int n,x,y;
int main(){
cin >> n;
while(n--){
cin >> y >> x;
if(y==1)m[x] = 1;
if(y==2)m[x] = 0;
if(y==3)cout << m[x]<<"\n";
}
}