diff --git a/InstallerSamples/Algorithms/QueensNonRecursive.pas b/InstallerSamples/Algorithms/QueensNonRecursive.pas new file mode 100644 index 000000000..d941f4082 --- /dev/null +++ b/InstallerSamples/Algorithms/QueensNonRecursive.pas @@ -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 \ No newline at end of file