Cod sursa(job #2663434)
Utilizator | Data | 26 octombrie 2020 13:12:07 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.44 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int main()
{
int n;
unordered_map<int,bool> M;
f>>n;
while(n--)
{
int cer,x;
f>>cer>>x;
assert(cer==1||cer==2||cer==3);
if(cer==1)
M[x]=true;
else if(cer==2)
M[x]=false;
else g<<(M[x]?true:false)<<'\n';
}
return 0;
}