Problem C
Sudokunique
The popular game of Sudoku requires the player to fill in a
3 |
5 |
7 |
4 |
9 |
1 |
6 |
2 |
8 |
9 |
2 |
4 |
8 |
6 |
7 |
3 |
5 |
1 |
6 |
1 |
8 |
5 |
2 |
3 |
4 |
7 |
9 |
1 |
6 |
9 |
2 |
7 |
5 |
8 |
3 |
4 |
7 |
4 |
5 |
9 |
3 |
8 |
1 |
6 |
2 |
8 |
3 |
2 |
6 |
1 |
4 |
7 |
9 |
5 |
2 |
9 |
1 |
3 |
8 |
6 |
5 |
4 |
7 |
5 |
7 |
6 |
1 |
4 |
2 |
9 |
8 |
3 |
4 |
8 |
3 |
7 |
5 |
9 |
2 |
1 |
6 |
Input
Input consists of up to
Output
For each board, if there is a unique solution, print the solution using the same format as the input. If there are multiple solutions, print “Non-unique”. If the designer has made a terrible mistake and there is no solution, print “Find another job”. Separate the outputs for adjacent cases with a blank line.
Sample Input 1 | Sample Output 1 |
---|---|
3 0 7 4 0 0 0 0 8 0 0 4 0 0 7 3 5 0 0 1 0 0 2 0 0 0 9 0 6 9 2 7 0 8 3 0 0 0 0 0 0 0 0 0 0 0 3 2 0 1 4 7 9 0 2 0 0 0 8 0 0 4 0 0 7 6 1 0 0 9 0 0 4 0 0 0 0 9 2 0 6 0 4 8 3 9 0 7 1 6 7 7 1 6 0 8 3 4 9 9 3 6 7 4 1 0 8 0 6 8 0 0 3 9 1 7 4 3 0 9 1 7 4 6 0 8 7 1 4 8 6 0 9 0 3 8 6 3 4 1 7 0 9 0 1 9 0 0 8 6 4 3 7 4 0 7 9 0 3 8 6 1 0 4 8 3 9 0 7 1 6 0 7 1 6 0 8 3 4 9 9 3 6 7 4 1 0 8 0 6 8 0 0 3 9 1 7 4 3 0 9 1 7 4 6 0 8 7 1 4 8 6 0 9 0 3 8 6 3 4 1 7 0 9 0 1 9 0 0 8 6 4 3 7 4 0 7 9 0 3 8 6 1 |
3 5 7 4 9 1 6 2 8 9 2 4 8 6 7 3 5 1 6 1 8 5 2 3 4 7 9 1 6 9 2 7 5 8 3 4 7 4 5 9 3 8 1 6 2 8 3 2 6 1 4 7 9 5 2 9 1 3 8 6 5 4 7 5 7 6 1 4 2 9 8 3 4 8 3 7 5 9 2 1 6 Find another job Non-unique |