Simple Set

Simple Set

You cannot submit for this problem because the homework's deadline is due.

Description

Implement a set as described in lab7 worksheet, and support a series of operations.

Input

In this problem, you should read from standard input.

The first line contains a single integer n — the number of operations.

The following n lines are one of following operation:
1. insert u: insert the integer u to the set.
2. remove u: remove the integer u from the set.
3. in u: check whether u is in the set.

Output

For each query (operation 3), you should print 1 if u is in this set, otherwise, print 0.
Print your answer in a single line for each query.

Sample Input

7
insert 1
insert 2
insert 3
in 1
remove 1
in 1
in 2

Sample Output

1
0
1

Specification

\(n\le 1000\)

Name your .c file as set.c and zip file as set.zip.

Lab7 Quiz

Not Claimed
Status
Finished
Problems
2
Open Since
2020-06-28 21:00
DDL
2020-06-30 23:59
Extension
24.0 hour(s)