Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes

-1 byte thanks to @ErikTheOutgolfer

(⎕IO←0)

×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴

Try it online!

-2 bytes thanks to @ngn and @H.PWiz ##How?

How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (∧=⌊ ... the diagonals or the top row and left column ...
  • )/ ̈∘⍳∘⍴ ... of S.

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes

-1 byte thanks to @ErikTheOutgolfer

(⎕IO←0)

×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴

Try it online!

-2 bytes thanks to @ngn and @H.PWiz ##How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (∧=⌊ ... the diagonals or the top row and left column ...
  • )/ ̈∘⍳∘⍴ ... of S.

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes

-1 byte thanks to @ErikTheOutgolfer

(⎕IO←0)

×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴

Try it online!

-2 bytes thanks to @ngn and @H.PWiz

How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (∧=⌊ ... the diagonals or the top row and left column ...
  • )/ ̈∘⍳∘⍴ ... of S.
added 1 character in body
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes

-1 byte thanks to @ErikTheOutgolfer

(⎕IO←0)

×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴

Try it online!

-2 bytes thanks to @ngn and @H.PWiz ##How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (∧=⌊ ... the diagonals or the top row and left column ...
  • )/ ̈∘⍳∘⍴ ... of S.

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes

-1 byte thanks to @ErikTheOutgolfer

(⎕IO←0)

×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴

Try it online!

-2 bytes thanks to @ngn and @H.PWiz ##How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (∧=⌊ ... the diagonals or the top row and left column ...
  • ) ̈∘⍳∘⍴ ... of S.

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes

-1 byte thanks to @ErikTheOutgolfer

(⎕IO←0)

×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴

Try it online!

-2 bytes thanks to @ngn and @H.PWiz ##How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (∧=⌊ ... the diagonals or the top row and left column ...
  • )/ ̈∘⍳∘⍴ ... of S.
added 26 characters in body
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) 15(削除) 15 (削除ここまで) 13 bytes

-1 byte thanks to @ErikTheOutgolfer

(⎕IO←0)

×ばつ≡(=/∨1∊⊢∧=⌊)/ ̈∘⍳∘⍴

Try it online! Try it online!

##How-2 bytes thanks to @ngn and @H.PWiz ##How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (=/∧=⌊ ... the diagonals ...
  • ∨1∊⊢ ... or the top row and left column ...
  • ) ̈∘⍳∘⍴ ... of S.

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) 15 bytes

-1 byte thanks to @ErikTheOutgolfer

×ばつ≡(=/∨1∊⊢) ̈∘⍳∘⍴

Try it online!

##How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (=/ ... the diagonals ...
  • ∨1∊⊢ ... or the top row and left column ...
  • ) ̈∘⍳∘⍴ ... of S.

APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes

-1 byte thanks to @ErikTheOutgolfer

(⎕IO←0)

×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴

Try it online!

-2 bytes thanks to @ngn and @H.PWiz ##How?

(2D input matrix S)

  • ×ばつ Check whether S is positive only on ...
  • (∧=⌊ ... the diagonals or the top row and left column ...
  • ) ̈∘⍳∘⍴ ... of S.
added 44 characters in body
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36
Loading
deleted 8 characters in body
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36
Loading
added 3 characters in body
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36
Loading
deleted 12 characters in body
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36
Loading
added 172 characters in body
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36
Loading
added 3 characters in body
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36
Loading
Source Link
Adalynn
  • 6.2k
  • 1
  • 18
  • 36
Loading

AltStyle によって変換されたページ (->オリジナル) /