ZOJ 1151 Word Reversal】的更多相关文章

题目连接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1151 题目描述: For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multip…
原题链接 题目大意:给一句话,把每个单词倒序,然后输出. 解法:我是用了一个堆栈,以空格来拆分单词,把每个字母压入堆栈,然后依次输出. 参考代码: /* * 字符串反向,140ms,188kb * 单词反向用堆栈是比较方便的,一个个压入,遇到空格再一个个弹出 * 但是不知道为什么耗时这么多,大批的人都是0ms,160kb,难道用字符串处理效率高这么多? */ #include<iostream> #include<string> #include<stack> #inc…
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151 For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is…
Word Reversal Time Limit: 2 Seconds      Memory Limit:65536 KB For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is an…
For each list of words, output a line with each word reversed without changing   the order of the words. Input You will be given a number of test cases. The first line contains a positive   integer indicating the number of cases to follow. Each case…
题目描述: For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is an integer N, then a blank line followed by N input blocks.…
For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each i…
For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each i…
acm之pku题目分类 对ACM有兴趣的同学们可以看看 DP:  1011   NTA                 简单题  1013   Great Equipment     简单题  1024   Calendar Game       简单题  1027   Human Gene Functions   简单题  1037   Gridland            简单题  1052   Algernon s Noxious Emissions 简单题  1409   Commun…
以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight Moves1101 Gamblers1204 Additive equations 1221 Risk1230 Legendary Pokemon1249 Pushing Boxes 1364 Machine Schedule1368 BOAT1406 Jungle Roads1411 Annive…