## Do You Want to Build a Snowman?

View as PDF

Points: 12
Time limit: 13.0s
Memory limit: 256M

Authors:
Problem type
##### 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 except of Olaf 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

• commented on April 7, 2020, 1:22 p.m.

If CCC '00 J1 - Calendar is the first level then this problem is the boss fight.

• commented on March 20, 2020, 9:20 p.m.

https://dmoj.ca/submission/1976305 Why am I getting a Presentation Error? I feel like I did everything the output specs said...

• commented on March 20, 2020, 10:12 p.m.

Do not print a newline character after the final test case.

• commented on March 20, 2020, 10:22 p.m.

Wow, thanks!

• commented on Aug. 29, 2019, 11:19 p.m.

Separate the test cases by an empty line with one or more spaces.

I WA when i print " \n" between my test cases, but AC when I use "\n" instead. Does this need to be fixed?

• commented on May 24, 2019, 11:53 p.m.

Presentation Error?

• commented on April 27, 2017, 1:06 a.m. edit 3

(Removed Comment)

• commented on March 1, 2016, 9:56 a.m.

This question ruined my life. Please remove it.

• commented on April 28, 2015, 12:00 a.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Feb. 14, 2015, 10:16 a.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on May 13, 2017, 1:17 p.m.

Time limit 30s memory limit 256M why....

• commented on April 28, 2015, 12:50 a.m.

I actually generated snowmen with C++ before throwing them on here.

• commented on March 31, 2020, 10:46 a.m.
• commented on Feb. 14, 2015, 12:57 p.m.

It's a perfectly valid solution.