Problem F: 藏头诗
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 1732 Solved: 593
[Submit][Status]
Description
有个小伙暗恋同班的姑娘,但是苦于害羞腼腆不敢直抒胸臆。于是小伙打算写一首英文情诗给她。为了使这首情诗高端霸气上档次,小伙经过三天三夜的精心创作写了一首藏头的情诗。请问你能看出他想要表达的真正内容吗?
Input
输入有T组(T≤20)。
每组数据第一行先输入一个整数N(N<100),表示下面要输入N行。
接下来N行,每行输入一段英文(长度小于1000,只含大小写英文字母和空格)。
Output
每组输出一行,为藏头诗要表达的真正内容。
Sample Input
1
8
I am a handsome man
lonely and long for you attention
of all the girls I met you gave me the deepest impression
Very lucky to know you
earn money to make you happy
you are the world
oh be ma side
u are the happiest person in the world
Sample Output
IloVeyou
#include<stdio.h>
#include<string.h>
char a[105][105];//定义二维的
int main()
{
int T,n,i,k;
scanf("%d",&T);
getchar();//注意
for(k=0;k<T;k++)
{
scanf("%d",&n);
getchar();//注意
for(i=0;i<n;i++)
gets(a[i]);
for(i=0;i<n;i++)
printf("%c",a[i][0]);
printf("\n");
}
}