
【一只蒟蒻的刷题历程】 【HDU 1062】 Text Reverse
发布日期:2021-05-04 19:23:53
浏览次数:20
分类:技术文章
本文共 1021 字,大约阅读时间需要 3 分钟。
B - Text Reverse
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
3olleh !dlrowm'I morf .udhI 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.
代码:
这里没有用栈,使用的是reverse翻转
#include#include #include #include #include #include #include #include #include
发表评论
最新留言
留言是一种美德,欢迎回访!
[***.207.175.100]2025年03月16日 17时03分21秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
花1亿扶持优质红人,如涵推动网红经济出圈之路有何深意?
2019-03-03
AMD、Intel、NVIDIA芯片三巨头内战
2019-03-03
开门红财报下,贝壳找房的春天依然有点冷
2019-03-03
虾米逝去:透视在线音乐的下一场战争
2019-03-03
抢滩抖音、B站,快手港股IPO进程加速
2019-03-03
智能穿戴的结局依然充满悬念
2019-03-03
Linux中的虚拟内存机制和内存映射
2019-03-03
Android系统启动系列5 SystemServer进程下
2019-03-03
Android四大组件系列9 ContentProvider原理
2019-03-03
理解PendingIntent
2019-03-03
Android SurfaceFlinger4 提交Buffer
2019-03-03
深入理解 ClientLifecycleManager 机制
2019-03-03
android基础知识回顾--ContentProvider简单用法
2019-03-03
压缩解压
2019-03-03
js try{}catch(){}finally{}语句
2019-03-03
ES6 块级绑定(二)
2019-03-03
ES6 函数模块(四)
2019-03-03
基于遗传算法(deap)的配词问题与deap框架
2019-03-03
JavaScript入门
2019-03-03