問題一覧 > 通常問題

No.2614 Delete ABC

レベル : / AI推定難易度 : 900 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 187
作問者 : startcpp / テスター : 👑 p-adic
お気に入りにしたユーザー ProblemId : 10150 / 自分の提出
問題文最終更新日: 2024-01-22 23:21:01
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 416 (順位表) の他の問題:

Problem Statement

For an integer $N$ greater than or equal to $2$, find one string $S$ of length $3N$ that satisfies all of the following conditions.

  1. Each character of $S$ is one of A, B, and C.
  2. $S$ cannot be turned into the empty string just by repeating the operation of deleting a substring ABC from $S$.
  3. $S$ can be turned into the empty string just by repeating the operation of deleting a not necessarily contiguous subsequence ABC from $S$.
  4. $S$ contains none of the substrings AA, BB, and CC.
Solve $T$ test cases.

Input

Line $1$ contains an integer $T$. Then, $T$ test cases follow.
Line $i + 1$ ($1 \le i \le T$) contains the $i$-th test case in the following format.
$N$
The input satisfies the following constraints.
  • All input values are integers
  • $1 \le T \le 100$
  • $2 \le N \le 100$

Output

For each test case, print the answer string on $1$ line.
If there are multiple answers, any of them will be accepted.
Print a newline after each test case.

Sample

Sample 1
Input
2
2
3
Output
ABACBC
ABACABCBC

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。