PROGRAMMING:Circular scheduling problem
Divide and conquer method is used to solve the circular scheduling problem. There are n = $$2 ^ {K} $$players who want to play tennis round robin. It is required to design a competition schedule that meets the following requirements:
(1) Each player must compete with the other N-1 players once.
(2) Each player can only play once a day.
(3) The round robin ends in n-1 days.
![ Picture 2. PNG] (~ / 21a7ab5d-b54b-456a-97dc-64724ecdf59b. PNG)
###Input example:
Enter the K value.
```in
three
```
###Output example:
Output game schedule.
```out
1 2 3 4 5 6 7 8
2 1 4 3 6 5 8 7
3 4 1 2 7 8 5 6
4 3 2 1 8 7 6 5
5 6 7 8 1 2 3 4
6 5 8 7 2 1 4 3
7 8 5 6 3 4 1 2
8 7 6 5 4 3 2 1
```
answer:If there is no answer, please comment
(1) Each player must compete with the other N-1 players once.
(2) Each player can only play once a day.
(3) The round robin ends in n-1 days.
![ Picture 2. PNG] (~ / 21a7ab5d-b54b-456a-97dc-64724ecdf59b. PNG)
###Input example:
Enter the K value.
```in
three
```
###Output example:
Output game schedule.
```out
1 2 3 4 5 6 7 8
2 1 4 3 6 5 8 7
3 4 1 2 7 8 5 6
4 3 2 1 8 7 6 5
5 6 7 8 1 2 3 4
6 5 8 7 2 1 4 3
7 8 5 6 3 4 1 2
8 7 6 5 4 3 2 1
```
answer:If there is no answer, please comment