<PREV Problem:
NEXT>
Solved by 599 users: ...
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 

Queens

Time limit = 2 second(s)

Memory limit = 33000 Kb

You are to find the number of different combinations of placement of N queens on the N x N 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 ≤ 15.

Output. The number of valid combinations.

Input#1
8
Output#1
92

Author:
Folklore
4 March 2005

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 190ms

SW soft NIX
ID = 54.162.181.75