Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
F ncsub(seq, s = 0)
|
||||
I seq.empty
|
||||
R I s >= 3 {[[Int]()]} E [[Int]]()
|
||||
E
|
||||
V x = seq[0.<1]
|
||||
V xs = seq[1..]
|
||||
V p2 = s % 2
|
||||
V p1 = !p2
|
||||
R ncsub(xs, s + p1).map(ys -> @x + ys) [+] ncsub(xs, s + p2)
|
||||
|
||||
print(ncsub(Array(1..3)))
|
||||
print(ncsub(Array(1..4)))
|
||||
print(ncsub(Array(1..5)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue