haha programming challenges class started at 2pm, teacher takes some 20 ish minutes to explain last week's solution and this week's problem

our group solved the problem and left before 3pm

(the problem was UVa's #278 - Chess and we had a chess buff in the group

@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.

@BatElite it's really really simple, you don't have to check anything, there are simple equations to how many pieces of each kind you can fit in an n x m board

f.ex for rooks, they attack only directly horizontally to them, so every other spot can have a rook

so (n*m/2) rounded up

Follow

@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

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!