Pagini recente » Monitorul de evaluare | Cod sursa (job #616495) | Cod sursa (job #889492) | Cod sursa (job #549285) | Cod sursa (job #1120799)
#include <stdio.h>
#include <set>
using namespace std;
multiset <int> S;
int main() {
freopen ("hashuri.in", "r", stdin);
freopen ("hashuri.out", "w", stdout);
int N, i, opt, x;
scanf ("%d", &N);
for (i = 1; i <= N; ++i) {
scanf ("%d %d", &opt, &x);
if (opt == 1) S.insert(x);
if (opt == 2) S.erase(x);
if (opt == 3) printf ("%d\n", S.count(x) != 0);
}
return 0;
}