AtCoder Regular Contest 211 (Div. 2)
B
Three Sequences
AtCoder
⌀ 1154
原题
← AC →
翻译中…

Problem Statement

翻译中…

You are given a triple of positive integers $(X,Y,Z)$ such that $X\leq Y\leq Z$.

翻译中…

Output one triple of sequences of non-negative integers $(S_1,S_2,S_3)$ that satisfies all of the following conditions:

翻译中…
  • The lengths of $S_1,S_2,S_3$ are each between $1$ and $1000$, inclusive.
  • The length of a longest sequence that is both a contiguous subsequence of $S_1$ and a contiguous subsequence of $S_2$ is $X$.
  • The length of a longest sequence that is both a contiguous subsequence of $S_1$ and a contiguous subsequence of $S_3$ is $Y$.
  • The length of a longest sequence that is both a contiguous subsequence of $S_2$ and a contiguous subsequence of $S_3$ is $Z$.
  • $\max(\max(S_1),\max(S_2),\max(S_3))$ is minimized among all triples satisfying the above four conditions.
翻译中…

It can be proved that under the constraints of this problem, a triple $(S_1,S_2,S_3)$ satisfying the conditions always exists. If there are multiple such triples, you may output any of them.

翻译中…

Constraints

翻译中…
  • $1\leq X\leq Y\leq Z\leq 100$
  • All input values are integers.
翻译中…

Input

翻译中…

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

翻译中…

X Y Z

翻译中…

Output

翻译中…

Output three lines.

翻译中…

The first line should contain $S_1$ in the following format, where $|S_1|$ denotes the length of $S_1$ and $S_{1,i}$ denotes the $i$-th element of $S_1$:

翻译中…

|S_1| S_{1,1} S_{1,2} \dots S_{1,|S_1|}

翻译中…

The second line should contain $S_2$ and the third line should contain $S_3$, both in the same format as $S_1$.

翻译中…

If there are multiple solutions, you may output any of them.

翻译中…

样例

Input #1
4 5 5
Output #1
10 1 1 0 0 1 0 1 0 1 1
8 1 1 0 1 0 0 1 1
11 1 0 0 0 1 1 0 1 0 1 0
It can be verified that $S_1=(1,1,0,0,1,0,1,0,1,1),S_2=(1,1,0,1,0,0,1,1),S_3=(1,0,0,0,1,1,0,1,0,1,0)$ satisfies the conditions as follows: - The lengths of $S_1,S_2,S_3$ are $10,8,11$, respectively, all of which are between $1$ and $1000$, inclusive. - The longest sequences that are both a contiguous subsequence of $S_1$ and a contiguous subsequence of $S_2$ are $(1,0,0,1)$ and $(1,0,1,0)$, with length $X=4$. - The longest sequences that are both a contiguous subsequence of $S_1$ and a contiguous subsequence of $S_3$ are $(1,0,1,0,1)$ and $(0,1,0,1,0)$, with length $Y=5$. - The longest sequence that is both a contiguous subsequence of $S_2$ and a contiguous subsequence of $S_3$ is $(1,1,0,1,0)$, with length $Z=5$. - $\max(\max(S_1),\max(S_2),\max(S_3))=1$, and it can be shown that it is impossible to satisfy the above four conditions with $\max(\max(S_1),\max(S_2),\max(S_3))=0$, so this is minimal.
题目信息
题号
arc211_b
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。