Problem D
Ordered Problem Set
You are running a programming contest that features
However, you have just sent your problems to the printer so
the order cannot be changed. For what values of
Input
The first line of input contains a single integer
Each of the next
Output
Output a list of integers, one per line. The integers are
all valid values of
Sample Input 1 | Sample Output 1 |
---|---|
6 1 3 2 4 5 6 |
2 |
Sample Input 2 | Sample Output 2 |
---|---|
6 1 2 3 4 5 6 |
2 3 6 |
Sample Input 3 | Sample Output 3 |
---|---|
6 6 5 4 3 2 1 |
-1 |