Cod sursa(job #2200222)
Utilizator | Data | 30 aprilie 2018 17:11:15 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.48 kb |
#include <iostream>
#include <fstream>
#include <map>
using namespace std;
int n, y, o;
map<int, bool> myMap;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int main()
{
int i, j;
fin >> n;
for (i = 1; i <= n; i++) {
fin >> o >> y;
if (o == 1) {
myMap[y] = true;
} else if (o == 2) {
myMap[y] = false;
} else {
fout << myMap[y] << '\n';
}
}
return 0;
}