Problem #10

6X6 Checker Challenge
Public 09/24/09 5xp Programming 73.3%

Examine the 6X6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is placed in each row and each column, and there is never more than one in any diagonal. (Diagonals run from southeast to northwest and southwest to northeast and include all diagonals, not just the major two.)

Column
1 2 3 4 5 6
----------------
1 | | O | | | | |
----------------
2 | | | | O | | |
----------------
3 | | | | | | O |
----------------
4 | O | | | | | |
----------------
5 | | | O | | | |
----------------
6 | | | | | O | |
----------------

The solution shown above is described by the sequence 2 4 6 1 3 5, which gives the column positions of the checkers for each row from 1 to 6.

ROW 1 2 3 4 5 6
COLUMN 2 4 6 1 3 5

This is one solution to the 6X6 Checker Challenge. Write a program that searches and finds all unique solution sequences to the 6x6 Checker Challenge. What is the total number of solutions found (including reflections and rotations.)?


Source: 1993 USACO Qualifying Round 1



You need to be a member to keep track of your progress.
Register


Time may end, but hope will last forever.

Other Challenge Sites

Contact

elasolova
[64][103][109][97][105][108][46][99][111][109]