Triangular N-Queens Challenge!

Posted on March 8, 2008
Filed Under Computer Science |

Note: I am competing in the CS Games in Canada, and will not be able to approve comments for the time being.

The Challenge

Triangular N-Queens

This is a problem that I faced in the 2006 ACM Greater New York Programming competition. I failed to solve it at the competition, but I was determined to do it at some point. When I was training for the 2007 competition the following year, I took a look at it again, and finally got it.

I particularly liked this problem because it has an easy obvious solution that runs too slow. It has another solution that seems like it works, but falls apart around a board size of 500. There is a third solution that is fast enough. And there may be more that I didn’t find.

The Basics of the Problem:

Can you solve it?

There are answers online. Don’t use them. Honor system!

Popularity: 16% [?]

Comments

One Response to “Triangular N-Queens Challenge!”

  1. sEAN on March 9th, 2008 4:45 pm

    “It has another solution that seems like it works, but falls apart around a board size of 500″

    I have an idea, but I’m afraid that it falls into that category. I’ll actually write the code and let you know.

Leave a Reply