No.701 Solo Shiritori
問題文最終更新日: 2026-06-27 04:09:33
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 193
(順位表)
の他の問題:
Problem Statement
Finish a game of shiritori in exactly $n$ turns.
The rules are as follows.
(1) A word may be any string of lowercase letters with length between 1 and 20, inclusive.
(2) If the last letter of a word is the same as the first letter of the next word, the shiritori continues.
(3) The shiritori ends when, and only when, a word ending in n is said.
(4) Any word may be used at the start.
(5) The same word must not be used two or more times.
Input
n
$1 \leq n \leq 100000$
Output
Output $n$ lines, each containing a string of lowercase letters with length between 1 and 20, inclusive.
Sample
Sample 1
Input
7
Output
kyuridenamida anta acrush hec climpet tourist tozangezan
Honorifics omitted.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
はむこ
ixmel