Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
|
|
@ -1,4 +1,4 @@
|
|||
def queens(n, i, a, b, c):
|
||||
def queens(n: int, i: int, a: list, b: list, c: list):
|
||||
if i < n:
|
||||
for j in range(n):
|
||||
if j not in a and i + j not in b and i - j not in c:
|
||||
|
|
@ -6,5 +6,6 @@ def queens(n, i, a, b, c):
|
|||
else:
|
||||
yield a
|
||||
|
||||
|
||||
for solution in queens(8, 0, [], [], []):
|
||||
print(solution)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue