<PREV Problem:
NEXT>
Solved by 151 users: ...
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 

Sudoku

Time limit = 8 second(s)

Sudoku of size N is square with side length M = N2. Sudoku is divided into N2 N-squares of size N x N. Each N-square is divided into N2 small squares. Each small square contains one integer from {1, 2, ..., N2}.

Each row, each column and each N-square of sudoku contains integer numbers {1, 2, ..., N2}.

Input Integer number N, 0 < N < 51.

Output Sudoku of size N.

Input#1
3
Output#1
1 3 2 5 4 6 9 8 7
4 6 5 8 7 9 3 2 1
7 9 8 2 1 3 6 5 4
9 2 1 4 3 5 8 7 6
3 5 4 7 6 8 2 1 9
6 8 7 1 9 2 5 4 3
5 7 6 9 8 1 4 3 2
2 4 3 6 5 7 1 9 8
8 1 9 3 2 4 7 6 5

Author:
Abzal Orzaliev
12 November 2007

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 180ms

SW soft NIX
ID = 54.81.197.127