Problem Statement
You are given integers $N, L, R$.
These integers satisfy the following:
$2 \leq N$$0\leq L < R \leq N$$(L, R)\neq (0, N)$
Initialize a length-$N$ sequence $A = (A_{0}, A_{1}, \dots , A_{N - 1})$ as $A = (0, 1, \dots, N - 1)$.
Choose a permutation $P = (P_{0}, P_{1}, \dots, P_{N - (R - L) - 1})$ of $(R - L, R - L + 1, \dots , N - 1)$, and perform the following operation for $i = 0, 1, \dots N - (R - L) - 1$ in this order.
- Let
$a$be the remainder when$P_{i}$is divided by$|A|$, and remove$A_{a}$from$A$(after removing an element, the indices of sequence$A$are renumbered starting from$0$).
Determine whether there exists a $P$ such that $A = (L, L + 1, \dots , R - 1)$ in the end, and if it exists, output one such $P$.
Constraints
$2\leq N\leq 2\times 10^{5}$$0\leq L < R\leq N$$(L, R) \neq (0, N)$- All input values are integers.
Input
The input is given from Standard Input in the following format:
N L R
Output
If there is no $P$ that makes $A = (L, L + 1, \dots , R - 1)$, output No.
If it exists, output a solution in the following format:
Yes
P_{0} P_{1} \cdots P_{N - (R - L) - 1}
Formally, output Yes on the first line, and output $P_{0}, P_{1}, \dots , P_{N - (R - L) - 1}$ separated by spaces on the second line.
If there are multiple solutions, any of them will be considered correct.
样例
6 3 5
Yes
2 4 5 3
9 2 4
Yes
4 5 6 7 3 8 2
178 68 167
No
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。