HDUOJ--------Text Reverse

Text Reverse Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13449    Accepted Submission(s): 5140 Problem Description Ignatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then output them.   Input The input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow. Each test case contains a single line with several words. There will be at most 1000 characters in a line.   Output For each test case, you should output the text which is processed.   Sample Input 3 olleh !dlrow m'I morf .udh I ekil .mca   Sample Output hello world! I'm from hdu. I like acm. Hint Remember to use getchar() to read '\n' after the interger T, then you may use gets() to read a line and process it.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏算法修养

POJ 2773 Happy 2006(容斥原理+二分)

Happy 2006 Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 1...

3037
来自专栏ml

HDUOJ----(1084)What Is Your Grade?

     关键是自己没有读懂题目而已,不过还好,终于给做出来了...... What Is Your Grade? Time Limit: 2000/1000 ...

2945
来自专栏ml

HDUOJ-----X问题

X问题 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/...

2737
来自专栏算法修养

HDU 3367 Pseudoforest(Kruskal)

Pseudoforest Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/655...

3055
来自专栏ml

HDUOJ---The number of divisors(约数) about Humble Numbers

The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/O...

3455
来自专栏算法修养

HDU 3309 Roll The Cube(bfs)

Roll The Cube Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/327...

41513
来自专栏ml

HDU-----(1083)Courses(最大匹配)

Courses Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

2737
来自专栏ml

HDUOJ------1711Number Sequence

Number Sequence Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/3...

3046
来自专栏ml

hdu 4315 Climbing the Hill(阶梯博弈转nim博弈)

Climbing the Hill Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/...

36211
来自专栏算法修养

POJ-1458 Common Subsequence(线性动规,最长公共子序列问题)

Common Subsequence Time Limit: 1000MS Memory Limit: 10000K Total Submis...

3287

扫码关注云+社区

领取腾讯云代金券