Cod sursa(job #3162537)
Utilizator | Data | 29 octombrie 2023 13:09:59 | |
---|---|---|---|
Problema | Hashuri | Scor | 30 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.39 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n,i,j,x,nr;
bool v[1000003];
//unordered_map<int,bool> v;
int main()
{
f>>n;
for(i=1;i<=n;i++)
{
f>>x>>nr;
if(x==1)
v[nr]=1;
if(x==2)
v[nr]=0;
if(x==3)
g<<v[nr]<<"\n";
}
return 0;
}