Public submissions
Source code of every submission to this problem in this contest will be visible for everyone since 2013-08-24 14:53:54.

STRHH - Half of the half

Given a sequence of 2*k characters, please print every second character from the first half of the sequence. Start printing with the first character.

Input

In the first line of input you are given the positive integer t (1<=t<=100) - the number of test cases. In the each of the next t lines, you are given a sequence of 2*k (1<=k<=100) characters.

Output

For each of the test cases please please print every second character from the first half of a given sequence (the first character should appear).

Example

Input:
4
your 
progress 
is 
noticeable

Output:
y
po
i
ntc

Added by:kuszi
Date:2012-09-01
Time limit:1s-1.289s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Public source code since: 2013-08-24 14:53:54

hide comments
2015-10-09 15:19:20 kuszi
@pooja mahapatra cin>>t; does not eat the endline so the next getline command scans an empty string
2015-10-08 11:46:38 pooja mahapatra
my test case stops when t=1 and for t=2 it's checking for first...what's the problem
2015-06-22 03:50:54
by the way, when i used gets(s); it got WA but when i changed it into scanf("%s",s); it got AC. how could? if you don't mind, please explain it to me :) thanks

Last edit: 2015-06-22 03:51:31
2015-06-22 03:49:06
finally AC after 3 WAs._.
2015-05-11 21:26:55 prodigy_coder
If I start a code like this, then it is just not taking an input string. Whats wrong with it and how do I get the string to input?
Code snippet:

string x;
int t;
cout<<"Enter No."<<endl;
cin>>t;
cout<<t<<endl;
cout<<"Enter string"<<endl;
getline(cin,x);
2014-02-20 15:35:21 kuszi
This is but 10K of input ...
2014-02-20 13:55:10 Achmet ibn Rashid
The time limit and input size seem to be prohibitive for BF; please consider increasing these limits since it's otherwise perfectly solvable.
2014-01-16 20:00:25 Dennis Lee
@mallipeddi akshay
yep the question is poorly phrased, but I will give you an example to show my understanding of this question
your -> half -> yo -> start from 1st char print every second char -> y
progress -> half -> prog -> start from 1st char, print every second char -> p o
noticeable -> half -> notic -> start from 1st char print every second char(skip 1 char in the word each time when printing) -> n t c
2014-01-10 18:32:36 ThunderStorm
can u explain the problem plz
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.