Cod sursa(job #2890011)
| Utilizator | Data | 14 aprilie 2022 09:24:50 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.54 kb |
#include <fstream>
#include <iostream>
#include <vector>
using namespace std;
vector<bool> v;
int main()
{
v.resize(2000000001);
ofstream cout("hashuri.out");
ifstream cin("hashuri.in");
// ifstream cin("para.py");
int n, s, kk = 0;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> s >> kk;
if (s == 1)
{
v[kk] = 1;
}
else if (s == 2)
{
v[kk] = false;
}
else
{
cout << v[kk] << "\n";
}
}
return 0;
}