Cod sursa(job #1988762)

Utilizator sichetpaulSichet Paul sichetpaul Data 4 iunie 2017 16:52:15
Problema Hashuri Scor 70
Compilator cpp Status done
Runda Arhiva educationala Marime 0.36 kb
#include <fstream>
#include <unordered_map>
using namespace std;
unordered_map <int,int> v;
int main()
{  int tip,x,i,n;
    ifstream f("hashuri.in");
    ofstream g("hashuri.out");
    f>>n;
    for (i=1;i<=n;++i) {
        f>>tip>>x;
        if (tip==1) v[x]=1;
        if (tip==2) v[x]=0;
        if (tip==3) g<<v[x]<<'\n';
    }
    return 0;
}