Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sudoku_solver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TheLostWanderer
sudoku_solver
Commits
be58ae1c
Commit
be58ae1c
authored
3 years ago
by
TheLostWanderer
Browse files
Options
Downloads
Patches
Plain Diff
add sudoku6
parent
cf6da182
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/sudoku.h
+2
-0
2 additions, 0 deletions
include/sudoku.h
src/sudoku.c
+37
-0
37 additions, 0 deletions
src/sudoku.c
with
39 additions
and
0 deletions
include/sudoku.h
+
2
−
0
View file @
be58ae1c
...
@@ -3,4 +3,6 @@
...
@@ -3,4 +3,6 @@
int
allocateSudoku1
(
int
sudoku
[
9
][
9
]);
int
allocateSudoku1
(
int
sudoku
[
9
][
9
]);
int
allocateSudoku6
(
int
sudoku
[]);
#endif
#endif
This diff is collapsed.
Click to expand it.
src/sudoku.c
+
37
−
0
View file @
be58ae1c
...
@@ -48,4 +48,41 @@ int allocateSudoku1(int sudoku[9][9]){
...
@@ -48,4 +48,41 @@ int allocateSudoku1(int sudoku[9][9]){
return
0
;
return
0
;
}
}
int
allocateSudoku6
(
int
sudoku
[]){
char
*
sudokuChar
[
16
]
=
{
{
"00JEIA0000GONM00"
},
{
"G0PIBKJH0000FA0O"
},
{
"00F0D0EG0BP0L0KC"
},
{
"000HMO0LFKEAPG0J"
},
{
"BPGK0DFJ00NIA00H"
},
{
"EM0COBIPA0HF0DN0"
},
{
"DIH000NEKGCPJ0MF"
},
{
"FN000MG0000LIE0P"
},
{
"0JM0NEKD00LCH000"
},
{
"ID0G00MAJP0N00BL"
},
{
"LAC00GOIB00000JD"
},
{
"P0KNLJ00EF0D0OAG"
},
{
"AF0LK0HBDO000IGM"
},
{
"0E0DJI00PCFGOKL0"
},
{
"00OPECD0LIM00FH0"
},
{
"KC0M0F00NH000JPE"
}
};
for
(
int
i
=
0
;
i
<
16
;
i
++
){
char
*
line
=
sudokuChar
[
i
];
for
(
int
j
=
0
;
j
<
16
;
j
++
){
char
cell
=
*
(
line
+
j
);
if
(
(
int
)
cell
==
48
){
sudoku
[
i
*
16
+
j
]
=
0
;
}
else
{
sudoku
[
i
*
16
+
j
]
=
(
int
)
cell
-
64
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment