|
|
本帖最后由 newkid 于 2014-9-25 08:27 编辑
#9 Knights and Rooks
In how many different ways can two knights and two rooks be placed on a standard chessboard so that no one attacks the others?
If this question had been asked for a 4x4 board than the answer would be 88. Four of those are as follows.
两个马和两个车放在一个标准棋盘上,有多少种摆法使得它们之间不互相攻击?
如果问的是4X4的棋盘,则答案是88。
-----------
标准棋盘是8X8; 马的攻击位置是“日”字型,车则是同一行和同一列的位置。这和中国象棋差不多。
类似的题目早被玩烂了,这用SQL毫无压力。
|
|