Woburn Challenge 2018-19 Round 1 - Senior Division
Alice has a -word essay due tomorrow , but she's too busy programming to bother with that! However, Alice happens to know that H.S. High School's English teacher is sick of reading and grading long essays, so she figures that if she just submits a "reasonable" essay which fulfills the requirements but is as short as possible, she may get some pity marks!
As such, Alice wants to write a program to generate a sequence of
words to pass off as her essay, where each word is any string consisting
of or more lowercase letters (
z) (not necessarily a real
English word). The essay will have no punctuation or formatting, as
those seem unnecessary to Alice. In an attempt to disguise the essay's
generated nature, Alice will insist that all words are distinct.
Finally, for her plan to come together, she'll make the sum of the
words' lengths as small as possible.
Help Alice generate any essay which meets the above requirements.
In test cases worth 5/20 of the points, .
In test cases worth another 5/20 of the points, .
The first and only line of input consists of a single integer, .
Output a single line containing Alice's essay: a sequence of distinct space-separated words, with the sum of their lengths minimized.
The sum of the lengths of the two words
i a is , which is
the minimum possible total length of a two-word essay. Various other
essays (such as
x y) would also be accepted. However, the essay
would not be accepted due to its words not being distinct, and the
i am would not be accepted due to the total length of its
words not being as small as possible.