-2

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

Votes + Comments
Don't listen to Salem. You shouldn't yell louder, yell at a higher frequency.
Try YELLING LOUDER next time :(
6
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by technogeek_42
0

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!!!

0

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.

0

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)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.