P27486 [AtCoder] Set of Integers
普及+
题目描述

Problem Description

Given a positive integer $ N $ and an operator $\mathrm{op}$ (<, =, >), determine whether there exists a set $ X $ that satisfies all the following conditions, and if so, construct one such set.

  • Each element of $ X $ is a non-negative integer between $ 0 $ and $ 10^9 $ inclusive.
  • $ |X| = N $. (Here, $ |X| $ denotes the number of elements in the set $ X $)
  • Let $S = \{ a + b \mid a, b \in X \}, D = \{ a - b \mid a, b \in X \}$. Then $|S| \mathrm{op} |D|$ holds.
  • In other words, $ S $ and $ D $ are the sets of possible sums and differences of elements in $ X $, respectively. Note that the case $ a = b $ is included in the definition. (Refer to the examples below)

For example, when $X = \{2, 0, 1, 9\}$, $S = \{0, 1, 2, 3, 4, 9, 10, 11, 18\}$ and $D = \{-9, -8, -7, -2, -1, 0, 1, 2, 7, 8, 9\}$, so $ |S| < |D| $.

Input Format

$ N $ $\mathrm{op}$

Output Format

If a set satisfying the conditions exists, output one such set. The set should be output with its elements separated by spaces.

If no such set exists, output Merry Christmas! instead.

Sample Input and Output

Sample Input #1

4 <

Sample Output #1

2 0 1 9

Sample Input #2

4 >

Sample Output #2

Merry Christmas!

Notes/Hints

Constraints

  • $1 \leq N \leq 2,019$.
  • $\mathrm{op}$ is one of <, =, >.

Sample Explanation 1

This is the example given in the problem statement.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
4 <
样例输出
2 0 1 9