問題一覧 > 通常問題

No.2410 Nine Numbers

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 129
作問者 : 👑 AngrySadEight / テスター : 👑 hamamu 👑 qand
お気に入りにしたユーザー ProblemId : 9862 / 自分の提出
問題文最終更新日: 2023-07-31 01:06:09
Nine Numbers
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. Show the original
yukicoder contest 401 (順位表) の他の問題:

Problem Statement

For an integer sequence $A$, you may perform the following operations any number of times, possibly $0$.

  • Choose $2$ distinct elements $x, y$ of $A$ (as long as they are different elements, the values of $x$ and $y$ may be equal). Remove one each of $x$ and $y$ from $A$, and append one $x + y$ to the end of $A$.
  • Choose $2$ distinct elements $x, y$ of $A$ (as long as they are different elements, the values of $x$ and $y$ may be equal). Remove one each of $x$ and $y$ from $A$, and append one $x - y$ to the end of $A$.

Find one integer sequence $A$ that satisfies all of the following conditions. It is guaranteed that such an $A$ exists.

  • The length of $A$ is $9$.
  • $1 \leq A_i \leq 9000(1 \leq i \leq 9)$
  • For every integer $x$ satisfying $1 \leq x \leq 9000$, there exists a way of performing operations on $A$ such that $x$ is contained among the elements of $A$ afterwards.

Input

No input is given.

Output

Output in the following format. Here, each $A_i$ must be an integer satisfying $1 \leq A_i \leq 9000$.

$A_1$ $A_2$ $A_3$ $A_4$ $A_5$ $A_6$ $A_7$ $A_8$ $A_9$

Sample

Sample 1
Output
1 2 14 2013 5 26 2013 8 12

This sample output only illustrates the output format; this output would be judged as incorrect.

For example, for this $A$, you can make $2023$ by performing the operations as follows.

  • Choose $x = 12, y = 2$. Remove one each of $12$ and $2$ from $A$, and add $12 - 2 = 10$ to $A$. This gives $A = \{1, 14, 2013, 5, 26, 2013, 8, 10\}$.
  • Choose $x = 2013, y = 10$. Remove one each of $2013$ and $10$ from $A$, and add $2013 + 10 = 2023$ to $A$. This gives $A = \{1, 14, 5, 26, 2013, 8, 2023\}$.

However, for this $A$, no matter how you perform the operations, you cannot reach a state in which $A$ contains $9000$. Therefore, this $A$ does not satisfy the conditions in the problem statement.

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