AT_arc229_a.AtCoder Reverse Contest

普及+/提高

通过率:0%

时间限制:2.00s

内存限制:1024MB

AC君温馨提醒

该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

For a string SS consisting of uppercase English letters, let f(S)f(S) be the maximum number of times the following operation can be performed when it is repeated zero or more times.

  • Choose one occurrence of the substring ARC and replace it with CRA.

For example, for S=S= ARARC, f(S)=2f(S)=2 (the operations ARARC →\to ARCRA →\to CRARA can be performed, and this is the maximum).

You are given an integer XX between 00 and 600600 (inclusive).

Find one string SS consisting of uppercase English letters, of length between 11 and 100100 (inclusive), satisfying f(S)=Xf(S)=X.

It can be proved that such a string always exists under the constraints.

对于一个仅由大写英文字母组成的字符串 SS,定义 f(S)f(S) 为以下操作最多可执行的次数(允许执行零次或多次):

  • 选择子串 ARC 的一次出现,并将其替换为 CRA。

例如,当 $S = $ ARARC 时,f(S)=2f(S) = 2(可执行操作 ARARC →\to ARCRA →\to CRARA,且这是最大可能次数)。

给定一个介于 00 和 600600(含端点)之间的整数 XX。

请找出一个仅由大写英文字母组成的字符串 SS,其长度在 11 到 100100(含端点)之间,且满足 f(S)=Xf(S) = X。

在本题约束下,可以证明这样的字符串一定存在。

输入格式

The input is given from Standard Input in the following format:

XX

输入从标准输入中按以下格式给出:

XX

输出格式

Output one string SS consisting of uppercase English letters, of length between 11 and 100100 (inclusive), satisfying f(S)=Xf(S)=X.

If there are multiple such strings SS, any of them will be accepted.

输出一个仅由大写英文字母组成的字符串 SS,其长度在 11 到 100100(含)之间,且满足 f(S)=Xf(S)=X。

若存在多个满足条件的字符串 SS,输出其中任意一个即可。

输入输出样例

  • 输入#1

    2

    输出#1

    ARARC
  • 输入#2

    0

    输出#2

    ATCODER
  • 输入#3

    3

    输出#3

    ARARCDARC

说明/提示

Sample 1 Explanation:
S=S= ARARC is a string of length 55 consisting of uppercase English letters, satisfying f(S)=2f(S)=2. Thus, outputting ARARC will be accepted.

Besides this, ARCXXXARC, for example, will also be accepted.

Constraints

  • 0≤X≤6000\le X\le 600
  • The input value is an integer.

样例 1 解释:
S=S= ARARC 是一个长度为 55 的、仅由大写英文字母组成的字符串,满足 f(S)=2f(S)=2。因此,输出 ARARC 是可接受的。

此外,例如 ARCXXXARC 也是可接受的。

约束条件

  • 0≤X≤6000\le X\le 600
  • 输入值为整数。

输入解题思路,AI测评打分。不知道怎么写?

首页