Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Solution to the
n Queens Puzzle
Description The eight queens puzzle is the problem of putting eight chess queens on an 8 × 8 chessboard such that none of them is able to capture any other. The puzzle has been generalized to arbitrary Input The input contains multiple test cases. Each test case consists of a single integer Output For each test case, output your solution on one line. The solution is a permutation of {1, 2, …, Sample Input 8 0 Sample Output 5 3 1 6 8 2 4 7 Source POJ Monthly--2007.06.03, Yao, Jinyu |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator