Pro.ID22318 TitleKeylogger Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22318 AC12 Submit56 Ratio21.43% 时间&空间限制描述As a malicious hacker you are trying to steal your mother's password, and therefore you have installed a keylogger on her PC (or Mac, so you like). You have a log from your mother typing the password, but unfortunately the password is not directly visible because she used the left and right arrows to change the position of the cursor, and the backspace to delete some characters. Write a program that can decode the password from the given keylog. 输入The first line of the input contains a single number: the number of test cases to follow. Each test case has the following format: One line with a string L, satisfying 1 ≤ Length(L) ≤ 1,000,000, consisting of:
Every decoded password will be of length > 0. 输出Description As a malicious hacker you are trying to steal your mother's password, and therefore you have installed a keylogger on her PC (or Mac, so you like). You have a log from your mother typing the password, but unfortunately the password is not directly visible because she used the left and right arrows to change the position of the cursor, and the backspace to delete some characters. Write a program that can decode the password from the given keylog. Input The first line of the input contains a single number: the number of test cases to follow. Each test case has the following format: One line with a string L, satisfying 1 ≤ Length(L) ≤ 1,000,000, consisting of:
Every decoded password will be of length > 0. Output For every test case in the input, the output should contain a single string, on a single line: the decoded password. Sample Input 2 Sample Output BAPC Source 样例输入2 样例输出BAPC 作者 |