Description: In the N* N chessboard (1 < = N < = 10) filled 1,2, ... N* N total number of N* N so that any two adjacent numbers and prime numbers. Output to meet the minimum conditions of the program sequence. The smallest sequence of each line will soon connect the composition of his party, and then in front of as small as possible so that, when the first phase at the same time the number is more of a following, and so on. For example, when N = 2, the sequence 1 2 4 3, when no program to meet the conditions of output " NO" .
To Search:
File list (Check if you may need any files):
chess.cpp