ECOO Practice 2014 (Round 1)
Anna is trying to get Elsa to come outside and play with her. She reminisces about the days where they used to build their childhood snowman named Olaf (who happens to love warm hugs). Unfortunately, Elsa is too stubborn to come out and play, so you will have to help Anna build Olaf yourself!
Olaf has three twigs on top of his head. He has two circular eyes, a carrot nose, and two arms made from sticks. The following is a depiction of Olaf:
| \ | / \ | / \|/ XXXXXXX X X X O O X X V X W X X X X \ X XXXXX X \ X X \ XXXXXXX \ X X--- X O X \ X X \ XXXXXXXXXXX \ X X M X O X X O X X X XXXXXXXXXXXXXXX OOOO OOOO OOOO OOOO
While Olaf is classically built with two torso sections (as shown in this example), Anna is bored, and would like to build Olaf with () torso sections. The topmost torso section is 7 characters wide at the top, and tapers down to being 11 characters wide at the bottom. In order for the snowman to be balanced when it's standing, the torsos must get larger as they get closer to the ground. Specifically, each torso section should be taller by a total of 1 character than the one above it, and width of the top of each torso section should be equal to the width of the bottom of the torso section above it. Furthermore, the number of buttons on each torso will grow by 1 each time. There will be two feet at the bottom of Olaf, each 2 rows by 4 columns, separated by a vertical gap, and horizontally centered relative to Olaf's body.
Input Specification
The input will contain 5 test cases, one line per test case. Each line will contain the integer , the number of torsos that you should give to Olaf.
Output Specification
For each test case, you should output Olaf with the specified amount of torsos. Every other aspect of Olaf except for the torsos should be exactly the same as the diagram above (e.g. the position of his eyes/nose/smile, the number of slashes for the arms and hair, etc.). The output should not contain any trailing spaces, and all letters in the output should be capitals. Separate the test cases by an empty line. The first line of output should not be blank.
Sample Input (only 2 examples shown here)
1
3
Sample Output
|
\ | /
\ | /
\|/
XXXXXXX
X X
X O O X
X V X
W X X X X
\ X XXXXX X
\ X X
\ XXXXXXX
\ X X---
X O X \
X X \
XXXXXXXXXXX \
OOOO OOOO M
OOOO OOOO
|
\ | /
\ | /
\|/
XXXXXXX
X X
X O O X
X V X
W X X X X
\ X XXXXX X
\ X X
\ XXXXXXX
\ X X---
X O X \
X X \
XXXXXXXXXXX \
X X M
X O X
X O X
X X
XXXXXXXXXXXXXXX
X X
X O X
X O X
X O X
X X
XXXXXXXXXXXXXXXXXXXXX
OOOO OOOO
OOOO OOOO
Comments
Can someone take a look at my submission, I am getting presentation error on both test cases.
You should still output 1 newline at the end of the last testcase, right now you output none
No, in fact, I do not want to build a snowman
If CCC '00 J1 - Calendar is the first level then this problem is the boss fight.
https://dmoj.ca/submission/1976305 Why am I getting a Presentation Error? I feel like I did everything the output specs said...
Do not print a newline character after the final test case.
Wow, thanks!
I WA when i print " \n" between my test cases, but AC when I use "\n" instead. Does this need to be fixed?
This question ruined my life. Please remove it.
This comment is hidden due to too much negative feedback. Show it anyway.
Time limit 13s memory limit 256M why....
I actually generated snowmen with C++ before throwing them on here.
Me too. https://dmoj.ca/problem/mockecoo14p1/submissions/harry7557558/
It's a perfectly valid solution.