Cod sursa(job #2439279)

Utilizator DavidAA007Apostol David DavidAA007 Data 15 iulie 2019 15:56:05
Problema Hashuri Scor 0
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.36 kb
#include<fstream>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n,tip,x;
bool f[1000005];
int main()
{
    f>>n;
    for(int i=1;i<=n;i++)
    {
        f>>tip>>x;
        if(tip==1)
            f[x]=1;
        if(tip==2)
            f[x]=0;
        if(tip==3)
            g<<f[x]<<"\n";
    }
    f.close();
    g.close();
    return 0;
}