tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,4 @@
|
|||
w[partitions_]:=Module[{s={},t=Total@partitions,list=partitions,k}, n=Length[list];
|
||||
While[n>0,s=Join[s,{Take[t,(k=First[list])]}];t=Drop[t,k];list=Rest[list];n--]; s]
|
||||
|
||||
m[p_]:=(Sort/@#)&/@(w[#,p]&/@Permutations[Range@Total[p]])//Union
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Grid@m[{2, 0, 2}]
|
||||
|
||||
Grid@m[{1, 1, 1}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue