1. When n mod 6! = 2 and N mod 6! = 3, there is a solution:
2, 4, 6, 8,..., n, 1, 3, 5, 7,..., N-1 (N is an even number)
2, 4, 6, 8,..., n-1, 1, 3, 5, 7,..., n (n is an odd number)
(The number of I in the above sequence is Ai, indicating that there is a queen in the AI column in the line I; In the sequence omitted by..., the numbers of adjacent two increase by 2. Same below)
2. When n mod 6 = 2 or N mod 6 = 3,
(When n is an even number, K = n/2; when n is an odd number, k = (n-1)/2)
K, K + 2, K + 4 ,..., n, 2, 4 ,..., k-2, K + 3, K + 5 ,..., n-1, 1, 3, 5 ,..., k + 1 (k is an even number, n is an even number)
K, K + 2, K + 4 ,..., n-1, 2, 4 ,..., k-2, K + 3, K + 5 ,..., n-2, 1,3, 5 ,..., k + 1, n (K is an even number, n is an odd number)
K, K + 2, K + 4 ,..., n-1, 1, 3, 5 ,..., k-2, K + 3 ,..., n, 2, 4 ,..., k + 1 (k is an odd number and N is an even number)
K, K + 2, K + 4 ,..., n-2, 1,3, 5 ,..., k-2, K + 3 ,..., n-1, 2, 4 ,..., k + 1, n (K is an odd number, n is an odd number)
In the second case, it can be considered that when n is an odd number, the last piece occupies the last position of the last row, and then the n-1 piece is used to fill the n-1 board, in this way, the problem is converted to the same type and N is an even number.
If K is an odd number, the first half of the sequence is an odd number. Otherwise, the first half is an even number.