Pagini recente » Diferente pentru problema/excel intre reviziile 16 si 17 | Cod sursa (job #786706) | Borderou de evaluare (job #2710121) | Cod sursa (job #110769) | 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;
}