You are in English class and learning about paradoxen. Unbeknownst to the teacher, the
set<bool> data structure is incredibly useful to determine whether or not a situation/statement is a paradox. Implement a
set<bool> interface for your teacher!
You are given ~C~ commands, each in the following 4 forms:
1 Einsert element
Einto the set. Print
falsedepending on whether or not the element was successfully inserted (did it not exist in the set before?).
2 Eerase element
Efrom the set. Print
falsedepending on whether or not the element was successfully erased (did it exist in the set before?).
3 Efind element
Ein the set. Print the index of the element within the set (0-indexed). If the element does not exist, print
4print the elements in increasing order. (
For each command, print a single line of output.
E will be either
~1 \le C \le 100~
5 1 true 2 false 3 false 1 false 4
true false -1 true false true