Queens |
Time Limit: 1 Seconds Memory Limit: 32768 K Total Submit:155 Accepted:98 |
Description You are to find the number of different combinations of placement of N queens on the NxN board. Every queen should NOT attack another (i.e. there should be no two figures sharing the same vertical, horizontal or diagonal. Input Number 1<=N<10. Output The number of valid combinations. Sample Input 8 Sample Output 92 |
KEY:经典的N皇后问题……回溯吧……



















































