文件名称:奇数N 阶魔方阵
介绍说明--下载内容均来自于网络,请自行研究使用
奇数N 阶魔方阵问题: 奇数N 阶魔方阵的构造规则如下: 1、在第一行的正中间填入1; 2、如果左上角能够移动,则往左上角填入后继的数;如果左上角不 能移动,则顺移到该列最下方左边的一列中最靠近该列的位置; 3、如果左上角不能移动,同时在该列位置的最下方左边最靠近的位 置处也不能填入数,则往该位置的上一行的最右边的位置处填入 后继数; 4、每次尽可能地往左上角填数,如果发现左上角已经填满了数,则 从当前填的数的位置下方填上后继数。 要求: 无。 输入: 用户从键盘任意输入一个正奇数。 输出: 打印出该魔方阵。-odd N bands Demon Lineup : N-odd magic Lineup Construction Rules are as follows : 1, the first line is the middle of a preference; Two, if the upper left corner to Mobile, the successor to fill in the upper left; If the upper left corner, unable to move, with the move out of the bottom of the left one of the closest out of position; three, if the upper left corner, unable to move, while in the position shown in the bottom left nearest location Department has not entered a few, to the position of the party on the right side of the positions filled successor; 4, each possible to fill the upper left corner, if fill the upper left corner, has found a few, from the current fill several positions to fill in the bottom subsequent few. Requirements : None. Input : arbitrary user input from the key
相关搜索: 魔方
(系统自动生成,下载前可以参看下载内容)
下载文件列表
2.3.cpp
2.3.doc
2.3.doc