ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib64/python2.7/Demo/scripts/queens.pyc
ó
Afc@sBdZdZddd„ƒYZd„Zedkr>eƒndS(s¹N queens problem.

The (well-known) problem is due to Niklaus Wirth.

This solution is inspired by Dijkstra (Structured Programming).  It is
a classic recursive backtracking approach.

itQueenscBsSeZed„Zd„Zdd„Zd„Zd„Zd„ZdZ	d„Z
RS(cCs||_|jƒdS(N(tntreset(tselfR((s+/usr/lib64/python2.7/Demo/scripts/queens.pyt__init__s	cCsf|j}dg||_dg||_dgd|d|_dgd|d|_d|_dS(Niii(RtNonetytrowtuptdowntnfound(RR((s+/usr/lib64/python2.7/Demo/scripts/queens.pyRs	icCs„x}t|jƒD]l}|j||ƒr|j||ƒ|d|jkrX|jƒn|j|dƒ|j||ƒqqWdS(Ni(trangeRtsafetplacetdisplaytsolvetremove(RtxR((s+/usr/lib64/python2.7/Demo/scripts/queens.pyRs
cCs0|j|o/|j||o/|j||S(N(RRR	(RRR((s+/usr/lib64/python2.7/Demo/scripts/queens.pyR&scCs@||j|<d|j|<d|j||<d|j||<dS(Ni(RRRR	(RRR((s+/usr/lib64/python2.7/Demo/scripts/queens.pyR
)s

cCs@d|j|<d|j|<d|j||<d|j||<dS(Ni(RRRRR	(RRR((s+/usr/lib64/python2.7/Demo/scripts/queens.pyR/s

cCs®|jd|_|jrdSdd|jdGHxbt|jdddƒD]G}dGx5t|jƒD]$}|j||kr…dGqedGqeWdGHqKWdd|jdGHdS(	Nis+-s--t+iÿÿÿÿt|tQt.(R
tsilentRRR(RRR((s+/usr/lib64/python2.7/Demo/scripts/queens.pyR7s	 	(t__name__t
__module__tNRRRRR
RRR(((s+/usr/lib64/python2.7/Demo/scripts/queens.pyRs	
			cCsšddl}d}t}|jdd!dgkrDd}|jd=n|jdrgt|jdƒ}nt|ƒ}||_|jƒdG|jGdGHdS(Niÿÿÿÿiiis-ntFounds
solutions.(tsysRtargvtintRRRR
(RRRtq((s+/usr/lib64/python2.7/Demo/scripts/queens.pytmainFs

	
t__main__N((t__doc__RRRR(((s+/usr/lib64/python2.7/Demo/scripts/queens.pyt<module>
s
8