Pagini recente » Cod sursa (job #1164300) | Cod sursa (job #1951416) | Cod sursa (job #2577303) | Diferente pentru problema/luffxor intre reviziile 3 si 4 | Cod sursa (job #1166318)
#include <iostream>
#include <fstream>
using namespace std;
ifstream d("hashuri.in");
ofstream o("hashuri.out");
const int N=1e9;
int x,y;
bool q[N];
int main()
{
d>>x;
while(d>>x>>y)
{
if(x==1)
{
q[y-1]=true;
continue;
}
if(x==2)
{
q[y-1]=false;
continue;
}
if(x==3)
{
if(q[y-1]==true)
o<<"1\n";
else
o<<"0\n";
continue;
}
}
return 0;
}