#P10585. 「ALFR Round 2」A Sum
「ALFR Round 2」A Sum
Problem Description
Given three integers , you need to construct a sequence of length such that:
-
$\forall 1 \leq i \leq n: 1 \leq a_i \leq 10^7, a_i \in \mathbb{Z}$;
-
$(\sum\limits_{1 \leq i < j \leq n} [a_i + a_j \leq q]) = p$。
In plain words, each number is a positive integer within , and among the pair sums formed by choosing two numbers from different positions (order does not matter), there are exactly sums that are not greater than . You only need to output one valid construction.
Input Format
One line with three integers .
Output Format
One line with numbers, representing the constructed sequence.
4 2 5
1 3 4 15
Hint
Constraints
| Subtask | Score | Restriction |
|---|---|---|
| - |
For of the testdata, , , .
Update 2024.7.1: According to this post, a set of hack testdata was added into subtask , with a score of points.
Translated by ChatGPT 5