Cod sursa(job #3291655)
Utilizator | Data | 5 aprilie 2025 11:19:45 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | cex_9 | Marime | 0.33 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map<int,int> fr;
int n,x,y;
int main()
{ fin>>n;
for(int i=1;i<=n;i++){
fin>>x>>y;
if(x==1) fr[y]=1;
else if(x==2) fr[y]=0;
else fout<<fr[y]<<"\n";
}
return 0;
}