首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > odd N bands Demon Lineup : N

odd N bands Demon Lineup : N

  • 资源大小:6.14 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 算法 c++

资 源 简 介

奇数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. Requ

文 件 列 表

2.3.cpp
2.3.doc
VIP VIP
0.181459s