Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
def ncsub(seq, s=0):
|
||||
if seq:
|
||||
x = seq[:1]
|
||||
xs = seq[1:]
|
||||
p2 = s % 2
|
||||
p1 = not p2
|
||||
return [x + ys for ys in ncsub(xs, s + p1)] + ncsub(xs, s + p2)
|
||||
else:
|
||||
return [[]] if s >= 3 else []
|
||||
Loading…
Add table
Add a link
Reference in a new issue