文件名称:chess
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:821byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在N*N的棋盘上(1<=N<=10)填入1,2,...N*N共N*N个数,使得任意两个相邻的数之和为素数.输出满足条件的最小序列的方案。
最小序列即将每一行连接起来组成一行,然后使前面的尽可能小,当第一个数字相同时则比较下面一个,依次类推。
比如当N=2时,序列为1 2 4 3,当无满足条件的方案时输出"NO"。
-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" .
最小序列即将每一行连接起来组成一行,然后使前面的尽可能小,当第一个数字相同时则比较下面一个,依次类推。
比如当N=2时,序列为1 2 4 3,当无满足条件的方案时输出"NO"。
-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" .
(系统自动生成,下载前可以参看下载内容)
下载文件列表
chess.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.