Cod sursa(job #2925677)
Utilizator | Data | 15 octombrie 2022 21:13:44 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.37 kb |
#include<bits/stdc++.h>
using namespace std;
ifstream F("hashuri.in");
ofstream G("hashuri.out");
#define M 666013
int n,o,x;
set<int> g[M];
int main()
{
for(F>>n;n--;)
if(F>>o>>x,o==1)
g[x%M].insert(x);
else if(o==2)
g[x%M].erase(x);
else
G<<(g[x%M].find(x)!=g[x%M].end())<<'\n';
return 0;
}