mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1015 B
43 lines
1015 B
![]()
5 years ago
|
## raid2
|
||
|
|
||
|
### Instructions
|
||
|
|
||
5 years ago
|
- Create a program that resolves a sudoku.
|
||
![]()
5 years ago
|
|
||
5 years ago
|
- A valid sudoku has only one possible solution.
|
||
![]()
5 years ago
|
|
||
5 years ago
|
### Usage
|
||
|
|
||
|
#### Example 1:
|
||
|
|
||
|
Example of output for one valid sudoku :
|
||
![]()
5 years ago
|
|
||
|
```console
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/raid2$ go build
|
||
|
student@ubuntu:~/[[ROOT]]/raid2$ ./raid2 ".96.4...1" "1...6...4" "5.481.39." "..795..43" ".3..8...." "4.5.23.18" ".1.63..59" ".59.7.83." "..359...7" | cat -e
|
||
![]()
5 years ago
|
3 9 6 2 4 5 7 8 1$
|
||
|
1 7 8 3 6 9 5 2 4$
|
||
|
5 2 4 8 1 7 3 9 6$
|
||
|
2 8 7 9 5 1 6 4 3$
|
||
|
9 3 1 4 8 6 2 7 5$
|
||
|
4 6 5 7 2 3 9 1 8$
|
||
|
7 1 2 6 3 8 4 5 9$
|
||
|
6 5 9 1 7 4 8 3 2$
|
||
|
8 4 3 5 9 2 1 6 7$
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/raid2$
|
||
5 years ago
|
```
|
||
|
|
||
|
#### Example 2:
|
||
|
|
||
|
Examples of output for invalid input or sudokus :
|
||
|
|
||
|
```console
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/raid2$ ./raid2 1 2 3 4 | cat -e
|
||
![]()
5 years ago
|
Error$
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/raid2$ ./raid2 | cat -e
|
||
![]()
5 years ago
|
Error$
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/raid2$ ./raid2 ".96.4...1" "1...6.1.4" "5.481.39." "..795..43" ".3..8...." "4.5.23.18" ".1.63..59" ".59.7.83." "..359...7" | cat -e
|
||
![]()
5 years ago
|
Error$
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/raid2$
|
||
![]()
5 years ago
|
```
|