|Online Judge||Problem Set||Authors||Online Contests||User|
HTML supports four different text alignments:
Text-based browsers render aligned texts by inserting spaces between neighboring words. Here words are strings consisting of non-space characters.
Now you are to implement a small routine that simulates the text-browsers’ behaviors in rendering aligned texts specified in the table below:
Your routine works in a greedy manner, that is, as many as possible words should be put into the first line, then as many as possible words should be put into the second line, etc.. Line width is fixed in your routine to be 75 characters.
The input contains a single test case on multiple lines. The first line contains only one character among “
Just print out the rendered text produced by your routine.
J Many years later, as he faced the firing squad, Colonel Aureliano Buendia was to remember that distant afternoon when his father took him to discover ice.
Many years later, as he faced the firing squad, Colonel Aureliano Buendia was to remember that distant afternoon when his father took him to discover ice.
Trailing spaces at the end of each output line can be ignored, though keeping them is also acceptable.
[Submit] [Go Back] [Status] [Discuss]
Home Page Go Back To top
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator