Data Update

This commit is contained in:
Ingy döt Net 2023-07-09 17:42:30 -04:00
parent 015c2add84
commit e50b5c3114
206 changed files with 6337 additions and 523 deletions

View file

@ -0,0 +1,12 @@
/* Inspired by code from Python */
Queens(N):=block([K,C,P,V,A,S,L:[]],
C: makelist(K,K,1,N),
P: permutations(C),
for V in P do (
A: length(unique(makelist(V[K]+K, K, C))),
S: length(unique(makelist(V[K]-K, K, C))),
if is(A=N) and is(S=N) then L: cons(V, L)
), L
)$
Queens(8);length(%);