C - 抛抛弱弱的题

C - 抛抛弱弱的题
Time Limit:1000MS    Memory Limit:131072KB    64bit IO Format:%lld & %llu

Description

Our innlab have a dog,this dog is God like~~so he said Stack is so easy, so he often said:"so easy~my mother never care about my Stack~~", then he give us a easy problem~~This problem you should output this numbers on reverse.(请您用栈写,否则会出现TLE)

Input

The input consists of several data sets. Each set begins with a line containing the number n .The next line contains n numbers.

Output

output this numbers on reverse

Sample Input

3iamdogdogiamsohappyyouareapig

Sample Output

godgodmaiyppahosmaigipaerauoy
// File Name: 抛抛弱弱的题.cpp
// Author: rudolf
// Created Time: 2013年03月12日 星期二 13时22分18秒

#include<vector>
#include<list>
#include<map>
#include<set>
#include<deque>
#include<stack>
#include<bitset>
#include<algorithm>
#include<functional>
#include<numeric>
#include<utility>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<ctime>

using namespace std;

int main()
{
	int t,lenth;
	char a[10000];
	while(~scanf("%d",&t))
	{
		while(t--)
		{
			scanf("%s",a);
			getchar();
			lenth=strlen(a);
			while(lenth--)
				printf("%c",a[lenth]);
			printf("\n");
		}
	}

return 0;
}

posted @ 2013-04-12 17:16  bo_jwolf  阅读(137)  评论(0)    收藏  举报