Cod sursa(job #2465985)

Utilizator sebastianp2003Popa Sebastian sebastianp2003 Data 1 octombrie 2019 10:08:52
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.42 kb
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
map<int, bool> v[200183];
int main()
{
    int n;
    f >> n;
    for (int t, a; n; n--)
    {
        f >> t >> a;
        if (t == 1)
            v[a % 200183][a] = 1;
        else if (t == 2)
            v[a % 200183][a] = 0;
        else
            g << v[a % 200183][a] << '\n';
    }
    return 0;
}