Problem #11

All Latin Squares
Public 09/24/09 7xp Programming 43.6%

A square arrangement of numbers
1 2 3 4 5
2 1 4 5 3
3 4 5 1 2
4 5 2 3 1
5 3 1 2 4

is a 5 x 5 Latin Square because each whole number from 1 to 5 appears once and only once in each row and column.
Write a program that will compute the number of NxN Latin Squares whose first row is:

1 2 3 4 5.......N

Sample Run
ENTER A WHOLE NUMBER (2-9): 4
THE NUMBER OF 4 x 4 LATIN
SQUARES IS 24.

What is the number of 5 x 5 Latin squares?


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]