摘要:
<script type="text/javascript">function QueenArithmetic(size){ var Queen = new Array(10);//每行皇后的位置 var y, x, i, j, d, t = 0; y = 0; Queen[0] = -1; while (true) { for (x = Queen[y] + 1; x < size; x++) { for (i = 0; i < y; i++) { j = Queen[i]; d = y - i; //检查新皇后是否能与以前的皇后相互攻击 if ( 阅读全文