Cod sursa(job #1446630)
| Utilizator | Data | 2 iunie 2015 13:44:32 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.5 kb |
#include <iostream>
#include <fstream>
#include <bitset>
#define Nmax 1299827
using namespace std;
fstream f("hashuri.in", ios::in);
fstream g("hashuri.out", ios::out);
bitset<2000000001> b;
int main()
{
int n;
f>>n;
for(int i = 0; i < n; ++i)
{
int a;
long long int x;
f>>a>>x;
if(a == 1)
b[x] = 1;
if(a == 2)
b[x] = 0;
if(a == 3)
g<<b[x]<<'\n';
}
return 0;
}
