WHO HAS ALGORITHMS OF PROBLEM : PLACE k<=8 QUEENS ON THE CHESSBOARD SO THAT THEY CONTROL (EXAMINE) ALL CELLS OF CHESSBOARD 8X8. THANKS!

Salem commented: Try YELLING LOUDER next time :( -2
sarehu commented: Don't listen to Salem. You shouldn't yell louder, yell at a higher frequency. +0

## All 5 Replies

well i have the same problem too but i only asked for help and someone deleted it !!some fox guy and he acts kind shesh thats why ill be deleting my account here soon..orkut is 10 times better!!!

well i have the same problem too but i only asked for help and someone deleted it !!some fox guy and he acts kind shesh thats why ill be deleting my account here soon..orkut is 10 times better!!!

Well, sorry, but we will not do your homework for you. If you want help, put effort into your assignment. Maybe other places hand you the solutions on a silver platter, but we certainly don't.

Here is a solution. Just convert it to C.

``````queens n = foldr qu [[]] [1..n]
where qu k qss = [ (j,k):qs | qs <- qss, j <- [1..n], all (safe (j,k)) qs ]
safe (i,j) (x,y) = i /= x && j /= y && abs (i-x) /= abs (j-y)``````

maybe tommorow i will try to help u coz i answer that maybe tommorow when i am online again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.