tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
2
Task/Ordered-Partitions/J/ordered-partitions-1.j
Normal file
2
Task/Ordered-Partitions/J/ordered-partitions-1.j
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require'stats'
|
||||
partitions=: ([,] {L:0 (i.@#@, -. [)&;)/"1@>@,@{@({@comb&.> +/\.)
|
||||
39
Task/Ordered-Partitions/J/ordered-partitions-2.j
Normal file
39
Task/Ordered-Partitions/J/ordered-partitions-2.j
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
partitions 2 0 2
|
||||
┌───┬┬───┐
|
||||
│0 1││2 3│
|
||||
├───┼┼───┤
|
||||
│0 2││1 3│
|
||||
├───┼┼───┤
|
||||
│0 3││1 2│
|
||||
├───┼┼───┤
|
||||
│1 2││0 3│
|
||||
├───┼┼───┤
|
||||
│1 3││0 2│
|
||||
├───┼┼───┤
|
||||
│2 3││0 1│
|
||||
└───┴┴───┘
|
||||
partitions 1 1 1
|
||||
┌─┬─┬─┐
|
||||
│0│1│2│
|
||||
├─┼─┼─┤
|
||||
│0│2│1│
|
||||
├─┼─┼─┤
|
||||
│1│0│2│
|
||||
├─┼─┼─┤
|
||||
│1│2│0│
|
||||
├─┼─┼─┤
|
||||
│2│0│1│
|
||||
├─┼─┼─┤
|
||||
│2│1│0│
|
||||
└─┴─┴─┘
|
||||
#partitions 2 3 5
|
||||
2520
|
||||
#partitions 5 7 11
|
||||
|out of memory: partitions
|
||||
| # partitions 5 7 11
|
||||
*/ (! +/\.)5 7 11
|
||||
1070845776
|
||||
#partitions 3 5 7
|
||||
360360
|
||||
*/ (! +/\.)3 5 7
|
||||
360360
|
||||
Loading…
Add table
Add a link
Reference in a new issue