atcoder#ARC117A. [ARC117A] God Sequence
[ARC117A] God Sequence
Score : points
Problem Statement
A sequence of length , , that satisfies all of the conditions below is said to be a god sequence.
- holds.
- There are exactly positive integers among .
- There are exactly negative integers among .
- are all distinct.
- holds for every .
Construct one god sequence.
We can prove that at least one god sequence exists under Constraints of this problem.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the elements of your sequence in one line, with space as separator.
If there are multiple god sequences, any of them will be accepted.
1 1
1001 -1001
A sequence contains positive integer and negative integer totaling .
It also satisfies the other conditions and thus is a god sequence.
1 4
-8 -6 -9 120 -97
A sequence contains positive integer and negative integers totaling .
It also satisfies the other conditions and thus is a god sequence.
7 5
323 -320 411 206 -259 298 -177 -564 167 392 -628 151