String Algorithm
Time Limit: 1.0 s
Memory Limit: 256.0 MB
Description
You are given a string S. You need to follow below process:
- Remove all even position character from the string S.
- If there are no even position remain in the string, print it. Otherwise follow step 1.
For example : String S="abcd".
S ="abcd", even position character mark in the bold. After remove S become "ac".
S="ac", even position character mark in the bold. After remove S become "a".
Now, S="a", there are no even position present in the string. So answer it.
Input
First Line T, Number of test case.
In each test case, a string S.
\(1<=T<=10^3\)
\(1<=|S|<=10^5\)
String S conatins only english lowercase alphabets.
It is gurantee that sum of |S| overall test case doesn't exceed \(10^5\)
Output
In each test case, print remaining string S.
Sample
Input | Output |
---|---|
|
|
First test case explain in the problem statement.
Information
- ID
- 1080
- Difficulty
- 1
- Category
- Implementation | String_Processing , Ad_Hoc , Brute_Force Click to Show
- Tags
- # Submissions
- 143
- Accepted
- 109
- Accepted Ratio
- 76%
- Uploaded By
Related
In following contests: