Код: Выделить всё
procedure permutations(N);
begin
c:= 1;
loop:
if N > 2 then permutations(N - 1)
endif;
while c < N:
P[B[N, c]] :=: P[N];
c:= c + 1;
repeat
end;
Подробнее здесь: https://stackoverflow.com/questions/796 ... javascript
Код: Выделить всё
procedure permutations(N);
begin
c:= 1;
loop:
if N > 2 then permutations(N - 1)
endif;
while c < N:
P[B[N, c]] :=: P[N];
c:= c + 1;
repeat
end;