Skip to main content
added 40 characters in body
Source Link
pxeger
  • 24.6k
  • 4
  • 53
  • 141

Python, 104104 93 bytes

lambda i:[[x for x in a if~-any(x<c>0<all(c in d for d in i if x in d)for b in i for c in ba)]for a in i]

Attempt This Online!Attempt This Online!

Stupid naïve iterative solution which I'm really not happy with. A recursive solution will be shorter.

-11 bytes thanks to a hint from xnor.

for a in z for b in a for c in b for d in c for e in d for f in e for g in f for h in g for i in h for j in i for k in j for l in j for m in l for n in m for o in n for p in o for q in p for r in q for s in r for t in s for u in t for v in u for w in v for x in w for y in x for z in y please kill me why is python's syntax so whitespace and keyword heavy

Python, 104 bytes

lambda i:[[x for x in a if~-any(x<c>0<all(c in d for d in i if x in d)for b in i for c in b)]for a in i]

Attempt This Online!

Stupid naïve iterative solution which I'm really not happy with. A recursive solution will be shorter.

for a in z for b in a for c in b for d in c for e in d for f in e for g in f for h in g for i in h for j in i for k in j for l in j for m in l for n in m for o in n for p in o for q in p for r in q for s in r for t in s for u in t for v in u for w in v for x in w for y in x for z in y please kill me why is python's syntax so whitespace and keyword heavy

Python, 104 93 bytes

lambda i:[[x for x in a if~-any(x<c>0<all(c in d for d in i if x in d)for c in a)]for a in i]

Attempt This Online!

Stupid naïve iterative solution which I'm really not happy with. A recursive solution will be shorter.

-11 bytes thanks to a hint from xnor.

for a in z for b in a for c in b for d in c for e in d for f in e for g in f for h in g for i in h for j in i for k in j for l in j for m in l for n in m for o in n for p in o for q in p for r in q for s in r for t in s for u in t for v in u for w in v for x in w for y in x for z in y please kill me why is python's syntax so whitespace and keyword heavy
Source Link
pxeger
  • 24.6k
  • 4
  • 53
  • 141

Python, 104 bytes

lambda i:[[x for x in a if~-any(x<c>0<all(c in d for d in i if x in d)for b in i for c in b)]for a in i]

Attempt This Online!

Stupid naïve iterative solution which I'm really not happy with. A recursive solution will be shorter.

for a in z for b in a for c in b for d in c for e in d for f in e for g in f for h in g for i in h for j in i for k in j for l in j for m in l for n in m for o in n for p in o for q in p for r in q for s in r for t in s for u in t for v in u for w in v for x in w for y in x for z in y please kill me why is python's syntax so whitespace and keyword heavy