Cod sursa(job #607559)
Utilizator | Data | 12 august 2011 16:34:46 | |
---|---|---|---|
Problema | Hashuri | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.29 kb |
#include<iostream.h>
#include<fstream.h>
#include<vector>
int a[400000000];
int main()
{ifstream f("hashuri.in");
ofstream h("hashuri.out");
long n,i;
int x,y;
f>>n;
for(i=1;i<=n;i++)
{f>>x>>y;
if(x==1)
a[y]=1;
else
if(x==2)
a[y]=0;
else
if(x==3)
h<<a[y]<<endl;}
return 0;}