Cod sursa(job #553899)
Utilizator | Data | 14 martie 2011 13:33:50 | |
---|---|---|---|
Problema | Hashuri | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.37 kb |
# include <fstream.h>
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n,o,x;
bool c[1990299999];
int main()
{
f>>n;
while(n)
{
n--;
f>>o>>x;
switch (o){
case 1: c[x]=true;
break;
case 2:c[x]=false;
break;
case 3: if(c[x]==true)g<<1<<'\n';
else
g<<0<<'\n';
break;
}
}
f.close();
g.close();
return 0;
}