No.3623 2-Letter Shiritori 2
Problem Statement
This problem is output-only. No input is given.
A sequence $X = (X_1, X_2, \cdots, X_n)$ of length $n$ consisting of strings of uppercase English letters is called a shiritori sequence if it satisfies the following condition.
- For each $i = 1, 2, \cdots, n$, the last character of $X_i$ is equal to the first character of $X_{i + 1}$, where $X_{n + 1} = X_1$.
There are $26^2$ possible strings of length $2$ consisting of uppercase English letters.
Among the sequences $S = (S_1, S_2, \cdots, S_{26^2})$ that list all of these strings without duplication, present one that is a shiritori sequence.
Input
No input is given in this problem.
Output
Output a sequence $S$ satisfying the conditions of the problem statement in the following format. Here, at least $1$ such $S$ exists.
$S_1$
$S_2$
$\vdots$
$S_{26^2}$
Sample
Sample 1
An example of output that does not satisfy the conditions of the problem statement is shown below.
Input
Output
AA AB BC CA
This sample output does not satisfy the conditions of the problem statement, for the following reason.
- For $i = 1, 2, 3, 4$, the last character of $S_i$ is equal to the first character of $S_{i+1}$, but this $S$ is not a sequence listing all strings of length $2$ consisting of uppercase English letters in the first place.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
ぽえ