Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,38 @@
|
|||
proc NCS(A, Size, Char);
|
||||
int A, Size, Char;
|
||||
int C, M;
|
||||
|
||||
proc Generate(M, K, C); \recursive
|
||||
int M, K, C;
|
||||
int I, J;
|
||||
[if K = M then
|
||||
[if C(M-1) # C(0)+M-1 then
|
||||
[for I:= 0 to M-1 do
|
||||
[if Char then ChOut(0, A(C(I)))
|
||||
else IntOut(0, A(C(I)));
|
||||
ChOut(0, ^ );
|
||||
];
|
||||
CrLf(0);
|
||||
];
|
||||
]
|
||||
else
|
||||
[for J:= 0 to Size-1 do
|
||||
[if K = 0 or J > C(K-1) then
|
||||
[C(K):= J;
|
||||
Generate(M, K+1, C);
|
||||
];
|
||||
];
|
||||
];
|
||||
];
|
||||
|
||||
[C:= Reserve(Size*4);
|
||||
for M:= 2 to Size-1 do Generate(M, 0, C);
|
||||
];
|
||||
|
||||
int A, CA;
|
||||
[A:= [1, 2, 3, 4];
|
||||
NCS(A, 4, false);
|
||||
CrLf(0);
|
||||
CA:= [^a, ^b, ^c, ^d, ^e];
|
||||
NCS(CA, 5, true);
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue