@squirrel That looks impossible to me if you don't have a chess buff.
But then that seems to be my problem every time something asks for this or permutations of stuff and other statistics stuff I was never thought. I'm not a mathematician capable of deriving algorithms for those things.
@squirrel It's getting to those equations though :P If you're allowed to find those somewhere the programming would seem trivial.
Also I'm guessing you're thinking about kings? That sounds about right. For rooks I'm thinking since they "take up" their entire row and column, the best you can do is {whichever of m and n is smaller} arranged diagonally.
That leaves queens and knights then, and those are probably the more difficult ones to figure out. Queens *might* be the same as rooks?
Also ty
@BatElite you're right i mixed them up