AtCoder Regular Contest 117
A
God Sequence
AtCoder
⌀ 0
原题
←B →
翻译中…

Problem Statement

翻译中…

A sequence of length $A + B$, $E = (E_1, E_2, \dots, E_{A+B})$, that satisfies all of the conditions below is said to be a god sequence.

翻译中…
  • $E_1 + E_2 + \cdots + E_{A+B} = 0$ holds.
  • There are exactly $A$ positive integers among $E_1, E_2, \dots, E_{A+B}$.
  • There are exactly $B$ negative integers among $E_1, E_2, \dots, E_{A+B}$.
  • $E_1, E_2, \dots, E_{A+B}$ are all distinct.
  • $-10^{9} \leq E_i \leq 10^9, E_i \neq 0$ holds for every $i$ $(1 \leq i \leq A+B)$.
翻译中…

Construct one god sequence.

翻译中…

We can prove that at least one god sequence exists under Constraints of this problem.

翻译中…

Constraints

翻译中…
  • $1 \leq A \leq 1000$
  • $1 \leq B \leq 1000$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

A B

翻译中…

Output

翻译中…

Print the elements of your sequence in one line, with space as separator.

翻译中…

If there are multiple god sequences, any of them will be accepted.

翻译中…

E_1 E_2 \cdots E_{A+B}

翻译中…

样例

Input #1
1 1
Output #1
1001 -1001
A sequence $(1001, -1001)$ contains $A=1$ positive integer and $B=1$ negative integer totaling $1001+(-1001)=0$. It also satisfies the other conditions and thus is a god sequence.
Input #2
1 4
Output #2
-8 -6 -9 120 -97
A sequence $(-8, -6, -9, 120, -97)$ contains $A=1$ positive integer and $B=4$ negative integers totaling $(-8)+(-6)+(-9)+120+(-97)=0$. It also satisfies the other conditions and thus is a god sequence.
Input #3
7 5
Output #3
323 -320 411 206 -259 298 -177 -564 167 392 -628 151
题目信息
题号
arc117_a
时间限制
2 s
内存限制
1024 MB

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