No.1619 Coccinellidae
Problem Statement
Construct one sequence of non-negative integers of length $N$ whose elements are pairwise distinct, such that the sum of the elements of the sequence is $M$ and the inversion number of the sequence is $K$.
Constraints
- All inputs are integers.
- $1 \le N\le 10^5$
- $0 \le K,M \le 10^{10}$
- Only inputs for which at least one sequence satisfying the conditions exists are given.
Input
$N$ $M$ $K$
Output
Print $N$ lines.
On line $i(1\le i \le N)$, print the $i$-th element of the constructed sequence.
Be sure to print a newline at the end. (If there is no trailing newline, it will be judged as WA.)
Sample
Sample 1
Input
3 6 2
Output
2 3 1
There are multiple other correct answers as well.
Note that the sequence $(2,5, -1)$ and the sequence $(3,3,0)$ are incorrect, since they violate the condition that the sequence consists of non-negative integers and the condition that the elements of the sequence are distinct, respectively.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
nok0
だれ