Hide
Problem O
Star Wars röðun
Languages
en
is

Image from cjsort
We define starwars-order, as an operation on a list of numbers, such that if the list is ordered, the first third moves to the center, the center third moves to the front and the last third stays put.
The problem is as follows, given a list of numbers, give their starwars-order.
For example for the Star wars movies, the starwars-order of
Input
The first line contains a single integer
Output
The starwars-order of the values in the input, given on a single line, separated by spaces.
Scoring
Group |
Points |
Constraints |
1 |
20 |
|
2 |
80 |
|
Sample Input 1 | Sample Output 1 |
---|---|
9 1 2 3 4 5 6 7 8 9 |
4 5 6 1 2 3 7 8 9 |
Sample Input 2 | Sample Output 2 |
---|---|
3 5 9 10 |
9 5 10 |
Sample Input 3 | Sample Output 3 |
---|---|
6 6 55 1 3 8 34 |
6 8 1 3 34 55 |