Cod sursa(job #3350985)

Utilizator eric_dragosDragos Eric eric_dragos Data 15 aprilie 2026 14:01:38
Problema Hashuri Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.44 kb
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int main(){
    set<int> s;
    int n;
    fin >> n;
    while(n--){
        int c,x;
        fin >> c >> x;
        if(c == 1){
            s.insert(x);
        }
        if(c == 2) s.erase(x);
        if(c == 3){
            fout << (s.find(x) != s.end()) << '\n';
        }
    }

    return 0;
}