Cod sursa(job #611118)
Utilizator | Data | 30 august 2011 19:56:18 | |
---|---|---|---|
Problema | Hashuri | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.31 kb |
#include<fstream.h>
bool a[99999][2000];
int main()
{ifstream f("hashuri.in");
ofstream h("hashuri.out");
long x,y,n,i;
f>>n;
for(i=1;i<=n;i++)
{f>>x>>y;
if(x==1)
a[y%10000][y/10000]=1;
else
if(x==2&&a[y%10000][y/10000]==1)
a[y%10000][y/10000]=0;
else
if(x==3)
h<<a[y%10000][y/10000]<<"\n";}
return 0;}