A neat puzzle I just saw: You can place a black king anywhere you like on a chessboard of a given size m×n. Where do you place it such that you can place also the maximal number of white queens that do not attack the king? And how many of those queens can you place?
@JulieSqveakaroo @dodec It seemed like a more interesting problem at first, but yeah, this sounds right.
@Rosemary @JulieSqveakaroo @dodec I think you can place it anywhere along the short edges, actually
each diagonal square you add by moving it away from the corner is going to correspond to a diagonal square removed on the other side
@Rosemary In a corner, I guess, because you rule out one row and one column no matter what, and as far as I can tell you can't do any better than ruling out only one diagonal... So that would leave mn - m - (n - 1) - (min(m, n) - 1) queens
@Trinket It seems to be a less interesting problem than I'd initially thought.
@Rosemary
Here's my first guess: put the king in one corner, then put queens in every single other square of the board that isn't in the same row, column, or diagonal as the one with the king. There will be (m-1)+(n-1)+(min(m,n)-1)+1 of those squares, so you get mn-m-n-min(m,n)+2 queens total. On an 8x8 board, that'd be 64-8-8-8+2 or 42.
I'm assuming it doesn't matter if the queens can attack one another; you didn't say it mattered.