文件名称:bishops
介绍说明--下载内容均来自于网络,请自行研究使用
棋盘上的象
★问题描述:
国际象棋中的象在棋盘上总是沿着对角线方向移动。若两个象互相处在对方可以到达的
位置上,就可以互相攻击。
★实验任务:
现在给你两个整数 n 和 k,求出将 k 个象摆放在一个 n×n 的棋盘上,并保证它们互相不能攻击的方案数。-On the board as ★ problem descr iption: like chess on the board is always moving along the diagonal direction. If two like each other in the position of the other party can reach, you can attack each other. ★ experimental task: give you two integers n and k, obtained the k as placed on an nn chessboard, and to ensure that the number of programs that they can not attack each other.
★问题描述:
国际象棋中的象在棋盘上总是沿着对角线方向移动。若两个象互相处在对方可以到达的
位置上,就可以互相攻击。
★实验任务:
现在给你两个整数 n 和 k,求出将 k 个象摆放在一个 n×n 的棋盘上,并保证它们互相不能攻击的方案数。-On the board as ★ problem descr iption: like chess on the board is always moving along the diagonal direction. If two like each other in the position of the other party can reach, you can attack each other. ★ experimental task: give you two integers n and k, obtained the k as placed on an nn chessboard, and to ensure that the number of programs that they can not attack each other.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
bishops.pdf
bishops.cpp