HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Linear Data structures: Stacks, Queues, Linked Lists, etc > problem:


50781 - ReversesreveR

Guest
• Discussion of problem (1)

Section problems

• 50291 - Postfix Arithmetic Expressions
• 50286 - Remove Duplicates
• 50775 - Balanced Parenthesis
• 50340 - Game 19
• 50877 - Friendly Queue
• 51086 - Top popular student
• 50774 - Hot Potato
• 50777 - Dwarfs Maze
• 50781 - ReversesreveR
• 50780 - Hot Potato - Revisited
• 50564 - Mother's Milk Buckets
• 50636 - Brackets
• 50776 - The number of different pa...
• 50779 - The shortest path in a maze

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question Adapted from Google Code Jam.

ReversesreveR

Question: Write a program that reads a file until the end. And it shows the words in reverse order.

Input specification
You will have a file with different words (alphanumeric or special ASCII characters) in it.

Output specification
Starting from the last word, show all words.

Sample Input I   
champion the red
yellow Galatasaray
Sample Output I   
Galatasaray yellow red the champion


Для отправки решений необходимо выполнить вход.

www.contester.ru