Pagini recente » Cod sursa (job #277293) | Cod sursa (job #3352008) | Cod sursa (job #3341124) | Monitorul de evaluare | 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;
}