QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 512 MB 満点: 100

#12381. Playing Games

統計

ljcc and his junior are playing a game consisting of $n$ rounds. Winning the $i$-th round awards $i$ points, and there are no draws.

Given the total scores of ljcc and his junior, determine if there exists a valid scenario that results in these scores.

Input

The input consists of a single line containing two integers $a$ and $b$, representing the scores of ljcc and his junior, respectively.

Output

If a solution exists, output a valid configuration on a single line. The first number represents the total number of rounds $n$, followed by the indices of the rounds that ljcc won. Separate each number with a single space, and do not include trailing spaces at the end of the line. If no valid solution exists, output No.

Examples

Example 1 Input

10 5

Example 1 Output

5 1 2 3 4

Subtasks

$a, b \le 2^{31}-1$, $1 \le n \le 10^5$

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.