QueensNonRecursive.pas
This commit is contained in:
parent
d6f30e8e70
commit
5bd51e4c96
6
InstallerSamples/Algorithms/QueensNonRecursive.pas
Normal file
6
InstallerSamples/Algorithms/QueensNonRecursive.pas
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// Нерекурсивное решение задачи о расстановке 8 ферзей
|
||||
|
||||
## (1..8).Permutations
|
||||
.Where(v->v.Numerate.Combinations(2)
|
||||
.All(\(\(a,b),\(c,d)) -> abs(a-c)<>abs(b-d)))
|
||||
.PrintLines
|
||||
Loading…
Reference in a new issue