## Mock ECOO '14 P1 - 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 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

• commented on May 11, 2022, 10:03 p.m. edited

Can someone take a look at my submission, I am getting presentation error on both test cases.

• commented on June 8, 2022, 4:33 p.m.

You should still output 1 newline at the end of the last testcase, right now you output none

• commented on April 30, 2022, 9:07 p.m.

No, in fact, I do not want to build a snowman

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

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

• commented on March 21, 2020, 1:20 a.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 21, 2020, 2:12 a.m.

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

• commented on March 21, 2020, 2:22 a.m.

Wow, thanks!

• commented on Aug. 30, 2019, 3:19 a.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 March 1, 2016, 2:56 p.m.

This question ruined my life. Please remove it.

• commented on Feb. 14, 2015, 3:16 p.m.

This comment is hidden due to too much negative feedback. Show it anyway.

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

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

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

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

• commented on March 31, 2020, 2:46 p.m.
• commented on Feb. 14, 2015, 5:57 p.m.

It's a perfectly valid solution.