Pagini recente » Cod sursa (job #465058) | Profil MihaelaCismaru | Cod sursa (job #1238224) | Cod sursa (job #2110676) | Cod sursa (job #2236123)
#include <iostream>
#include <fstream>
#define MAX 1000000
using namespace std;
ifstream f("hashuri.in");
ofstream g("Hashuri.out");
int N,v[MAX];
int main()
{int op,x;
f>>N;
while(N!=0)
{
N--;
f>>op>>x;
{
if(op==1)
if(v[x]==0)
v[x]=1;
if(op==2)
if(v[x]==1)
v[x]=0;
if(op==3)
if(v[x]==1)
g<<1<<endl;
else
g<<0<<endl;
}
}
cout << "Hello world!" << endl;
return 0;
}