Cod sursa(job #3250844)
Utilizator | Data | 23 octombrie 2024 20:28:22 | |
---|---|---|---|
Problema | Hashuri | Scor | 30 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.37 kb |
#include <fstream>
#include <map>
using namespace std;
ifstream cin ("hashuri.in");
ofstream cout ("hashuri.out");
int t,c,x;
bool f[40000000];
int main()
{
cin>>t;
while (t)
{
t--;
cin>>c>>x;
x=x%39001012;
if (c==1) f[x]=1;
if (c==2) f[x]=0;
if (c==3) cout<<f[x]<<'\n';
}
return 0;
}