From 5f2c49d2cf6d47d78bcb23f5c61507304e033c90 Mon Sep 17 00:00:00 2001 From: Dominic Zimmer Date: Wed, 28 Jul 2021 17:48:30 +0200 Subject: [PATCH] Fix crucial comment --- sudoku.py | 4 +++- sudokus/19.in | 9 +++++++++ sudokus/20.in | 9 +++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 sudokus/19.in create mode 100644 sudokus/20.in diff --git a/sudoku.py b/sudoku.py index 6910d9d..06c1a81 100755 --- a/sudoku.py +++ b/sudoku.py @@ -190,7 +190,7 @@ for value in range(8,0, -1): all_paths = [new_path] + extended_paths paths[cell].extend(all_paths) -# all_paths : list[Path] = [ path for cell in all_cells(solution) for path in paths[cell] ] +all_paths : list[Path] = [ path for cell in all_cells(solution) for path in paths[cell] ] def get_cells(path: Path) -> Iterator[FilledCell]: yield path[0].fr @@ -212,6 +212,8 @@ def ilike(path: Path) -> bool: max_one_solved = len(given_cells) < 2 return max_one_solved +# print("all paths are", len(all_paths), "paths") + hints : list[list[Thermo | Cell]] = empty_grid() used_cells: set[FilledCell] = set() num_paths = 4 diff --git a/sudokus/19.in b/sudokus/19.in new file mode 100644 index 0000000..dbc0e23 --- /dev/null +++ b/sudokus/19.in @@ -0,0 +1,9 @@ +006900030 +700008090 +300020704 +004006000 +089000650 +000300400 +405080002 +060500001 +010009300 diff --git a/sudokus/20.in b/sudokus/20.in new file mode 100644 index 0000000..2ca6300 --- /dev/null +++ b/sudokus/20.in @@ -0,0 +1,9 @@ +850210000 +600007000 +219065400 +000042000 +100000002 +000630000 +004820163 +000400008 +000076094