问题描述 :
After defeating the Voldemort, Harry is enjoying his senior year in Hogwarts with his friends. They decide to make a graduation trip, using their newest magical broom. In the journey, Harry is trapped in a Kingdom named Binary Kingdom, maybe because the smart but isolated people still have no idea of the great reputation of this young wizard. Loving numbers and binary very much, the subjects of Binary Kingdom claim only Harry solve the problem can he leave there.
Harry Potter and J.K.Rowling
The problem begins with an empty number multi-set, with six kinds of operation:
Though our brave Harry Potter can proficient in many fields, he is not good at math, now, it’s your time.
输入:
The first line contains a single integer T, indicating the number of test cases.
Each test case begins with an integer M, following M operations.
Technical Specification
输出:
The first line contains a single integer T, indicating the number of test cases.
Each test case begins with an integer M, following M operations.
Technical Specification
样例输入:
1
10
INS 1
INS 2
DEL 1
INS 3
DEL 1
ADD 1
SUB 4
QNUM 2
QBIT 1
QBIT 2
样例输出:
Case 1:
Del error
Sub error
0
1
1
http://www.acmerblog.com/hdu-3983-harry-potter-and-the-binary-kingdom-6986.html