<PREV Problem:
NEXT>
Solved by 599 users: ...
UserDateAttemptTimeCMSC
zhuojie29 oct 2009Python200.0610 
qdiesel24 apr 2009Ruby400.0212 
V.A.KeRneL13 nov 2006Ruby500.0212 
daniel.ugra10 jan 2007Ruby500.0212 
kil10 jul 2007Ruby100.0225 
qdiesel24 apr 2009Ruby300.0225 
V.A.KeRneL13 nov 2006Ruby400.0225 
Jacob19 mar 2009Ruby1100.0227 
V.A.KeRneL13 nov 2006Ruby200.0233 
V.A.KeRneL13 nov 2006Ruby300.0233 
zhuojie29 oct 2009Python100.0636 
gchebanov17 sep 2010Python300.0636 
Nakilon12 jan 2010Ruby100.0238 
qdiesel24 apr 2009Ruby200.0238 
david_it2111 oct 2008Ruby300.0238 
bush16 mar 2006Ruby400.0238 
Languages
C++
288
FPC
164
C
64
Kylix
37
Java
32
Ruby
16
Python
13
Perl
2
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

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 = 34.204.176.125