You have a list of integers, initially the list is empty.
You have to process Q operations of three kinds:
The first line contains an integer T indicating the total number of test cases. Each test case begins with an integer Q. Each of the following Q lines contains an operation type string T and an integer s.
Constraints
For each cnt s operation, output the answer in a new line.
1 7 add 11 cnt 15 add 4 add 0 cnt 6 del 4 cnt 15
1 2 2
For first line, we have 15 AND 11 = 11 so the answer is 1
For second line, 6 AND 0 = 0 and 6 AND 4 = 4 so the answer is 2
For third line, 4 has been deleted and we have 15 AND 11 = 11 and 15 AND 0 = 0 so the answer is 2
Migrated from old NTUJ.
CounterCode 2015
No. | Testdata Range | Score |
---|