-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.cpp
64 lines (61 loc) · 1.38 KB
/
2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define FOK(i, a, n) for (int i = n; i > a; i--)
#define JALDI ios_base::sync_with_stdio(false);
#define jaldi cin.tie(NULL);
#define F first
#define MP make_pair
#define PB push_back
#define S second
#define nl cout << endl
#define nl cout << endl
#define ALL(container) (container).begin(), (container).end()
#define RALL(container) (container).rbegin(), (container).rend()
#define SZ(container) ((int)container.size())
char c;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<pair<int, int>> vpi;
ll m, n, q;
int main()
{
// freopen (file".in", "r", stdin);
// freopen (file".out", "w", stdout);
JALDI jaldi
int t = 1;
// cin >> t;
while (t--)
{
set<int> s;
cin >> n;
FOR(i, 0, n)
{
cin >> m;
cin >> q;
if (m == 1)
{
s.insert(q);
}
else if (m == 2)
{
s.erase(q);
}
else
{
if (s.count(q))
{
cout << "Yes";
}
else
{
cout << "No";
}
nl;
}
}
}
return 0;
}