WC '15 Finals J1 - Vertical Posting

View as PDF

Submit solution


Points: 3
Time limit: 1.0s
Memory limit: 16M

Author:
Problem type
2015-16 Woburn Challenge Finals Round - Junior Division

After 14 years of living in fearful hiding, the Head-Monkey and her band of primates have finally perfected their battle strategy to regain control of their native home of Scarberia. At last, they're ready to launch a ruthless series of attacks against the wicked cows who, under the leadership of Bo Vine, unjustly exiled the monkeys all those years ago!

Now, the cows had really become quite content with their Scarberian lives, free to eat their feed on farmer Daniel MacDonald's farm in peace. However, they weren't about to be taken by surprise by this turn of events. As everyone knows, all cows possess a geomagnetic sixth sense, which historically guided their ancestors during migrations. One day, while Bo Vine was out chewing his cud, his particularly potent sixth sense picked up on something rather peculiar. Detecting a disturbance in the electromagnetic field surrounding the Sacred Farm, Bo Vine swiftly realized that the monkeys' long overdue counterattack was imminent! As fast as he could, he rushed back to the barn, where the lethargic farmer had been nibbling a stalk of wheat. Standing before him, Bo Vine let out a thunderous bellow which could be heard throughout the entire countryside – "Dang, Daniel! The monkeys are back at it again with the bright plans!"

Just what is the monkeys' bright plan? Well for starters, they know that the imminent war will be fought in 2016. Preparing to be belligerents of the 21st century, they concluded that the only true way of declaring war is by trash-talking their enemies on the Internet. A recent trend on many online forums is known as vertical posting, where the poster writes a message vertically and horizontally, joined by the first letter. For example, the word BRAVO can be vertically-posted as follows:

B R A V O
R
A
V
O

Note that, to account for the difference in dimensions of most computer fonts, a single space must be added between adjacent horizontal letters.

This method of spamming is very effective in provoking rage amongst members of a community. As such, the monkeys plan on vertically posting nasty messages over the cows' social networks! The problem is, it takes lots of time and effort to manually create such hateful (yet beautiful) works of art in a text editor. To speed up this process, the Head-Monkey has designated you to write a program to automatically generate the vertical posting from any desired message.

Input Specification

The first and only line of input consists of a single string of at most 20 uppercase/lowercase letters from A to Z.

Output Specification

Output the resulting vertical posting, preserving the case of every letter in the input. Your output must match the format of the sample output exactly!

Sample Input

getREKTcows

Sample Output

g e t R E K T c o w s
e
t
R
E
K
T
c
o
w
s

Comments


  • 0
    mickey1337  commented on Aug. 5, 2021, 1:38 a.m. edited

    the result where it says WA but it's accurate

    I get the intended results but shows as "WA" (Wrong Answer) for all the testing variables. I've attached the results.

    Can see that it preserves the case for every letter. Not sure what else I need to do for it to be accepted.

    Thanks for any guidance.


    • 2
      AZron  commented on Aug. 5, 2021, 1:52 a.m.

      Read the sample output very carefully. In particular, look at the first line.


      • 2
        mickey1337  commented on Aug. 5, 2021, 4:10 a.m.

        Thanks! I overlooked the the fact that "a single space must be added between adjacent horizontal letters". Thanks again.