atcoder#ARC145D. [ARC145D] Non Arithmetic Progression Set
[ARC145D] Non Arithmetic Progression Set
Score : points
Problem Statement
Construct a set of integers satisfying all of the conditions below. It can be proved that at least one such set exists under the Constraints of this problem.
- has exactly elements.
- The element of are distinct integers between and (inclusive).
- .
- for every triple of distinct elements in .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Let be the elements of . Print a set that satisfies the conditions in the following format:
If multiple solutions exist, any of them will be accepted.
3 9
1 2 6
We have and , so this output satisfies the conditions. Many other solutions exist.
5 -15
-15 -5 0 2 3
may be negative.