Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 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