Cod sursa(job #2400642)
| Utilizator | Data | 8 aprilie 2019 22:59:14 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.46 kb |
#include <fstream>
#include <set>
#define mod 576101
typedef unsigned long long ll;
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
set<ll> a;
int n;
int main() {
cin >> n;
while(n--) {
ll h;
int cer;
cin >> cer >> h;
switch(cer) {
case 1:
a.insert(h);
break;
case 2:
a.erase(h);
break;
case 3:
cout << (a.find(h) != a.end()) << '\n';
break;
}
}
return 0;
}
