Cod sursa(job #3286116)
Utilizator | Data | 13 martie 2025 18:52:44 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.41 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n, tip, x;
map<int, int> fr;
int main()
{
fin >> n;
for(int i=0; i<n; i++) {
fin >> tip >> x;
if(tip==1) {
fr[x]=1;
} else if(tip==2) {
fr[x]=0;
} else {
fout << fr[x] << "\n";
}
}
return 0;
}