Pagini recente » Diferente pentru problema/dir intre reviziile 26 si 25 | Cod sursa (job #385296) | Cod sursa (job #870547) | Cod sursa (job #2197309) | Cod sursa (job #1166088)
#include <iostream>
#include <fstream>
using namespace std;
ifstream d("hashuri.in");
ofstream o("hashuri.out");
const int N=2e9;
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;
}