Cod sursa(job #1497838)
Utilizator | Data | 7 octombrie 2015 16:33:10 | |
---|---|---|---|
Problema | Hashuri | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.37 kb |
#include <fstream>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
int n, op, a;
bool s[200000001];
int main()
{
fin >> n;
for (int i = 1; i<=n; i++)
{
fin >> op;
fin >> a;
if (op == 1)s[a]=1;
if (op == 2)s[a]=0;
if (op == 3)fout << s[a] <<'\n';
}
return 0;
}