#C346. Sudoku Solver
Sudoku Solver
Sudoku Solver
Given a partially filled 9×9 Sudoku board, your task is to complete the board so that every row, every column, and every 3×3 subgrid contains each of the digits from 1 to 9 exactly once. In other words, for every row, column and subgrid, the set of values must be $$\{1,2,3,4,5,6,7,8,9\}$$.
The board is provided with empty cells denoted by 0. You can assume that each given puzzle has a unique solution.
inputFormat
The input consists of 9 lines, each line containing 9 space-separated integers. The integer 0 represents an empty cell in the Sudoku board.
outputFormat
Output the solved Sudoku board in 9 lines. Each line should contain 9 space-separated integers representing one row of the completed board.
## sample5 3 0 0 7 0 0 0 0
6 0 0 1 9 5 0 0 0
0 9 8 0 0 0 0 6 0
8 0 0 0 6 0 0 0 3
4 0 0 8 0 3 0 0 1
7 0 0 0 2 0 0 0 6
0 6 0 0 0 0 2 8 0
0 0 0 4 1 9 0 0 5
0 0 0 0 8 0 0 7 9
5 3 4 6 7 8 9 1 2
6 7 2 1 9 5 3 4 8
1 9 8 3 4 2 5 6 7
8 5 9 7 6 1 4 2 3
4 2 6 8 5 3 7 9 1
7 1 3 9 2 4 8 5 6
9 6 1 5 3 7 2 8 4
2 8 7 4 1 9 6 3 5
3 4 5 2 8 6 1 7 9
</p>