Skip to main content
added 72 characters in body
Source Link
Erik the Outgolfer
  • 40.6k
  • 5
  • 45
  • 122

APL (Dyalog), 2725 bytes

(2∘|(3 3⍴⊢,1↓⊖,∘⌽)>∘3¨>∘3 5 1 7,2∘|)¨

Try it online!Try it online!

-2 thanks to ngn.

The output format is a little bit weird: this function returns an array containing two shape-3,3 arrays each containing 0s and 1s.

APL (Dyalog), 27 bytes

((3 3⍴⊢,1↓⊖)>∘3 5 1 7,2∘|)¨

Try it online!

The output format is a little bit weird: this function returns an array containing two shape-3,3 arrays each containing 0s and 1s.

APL (Dyalog), 25 bytes

2∘|(3 3⍴⊢,,∘⌽)¨>∘3 5 1 

Try it online!

-2 thanks to ngn.

The output format is a little bit weird: this function returns an array containing two shape-3,3 arrays each containing 0s and 1s.

Source Link
Erik the Outgolfer
  • 40.6k
  • 5
  • 45
  • 122

APL (Dyalog), 27 bytes

((3 3⍴⊢,1↓⊖)>∘3 5 1 7,2∘|)¨

Try it online!

The output format is a little bit weird: this function returns an array containing two shape-3,3 arrays each containing 0s and 1s.